Update task task-87
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
---
|
||||
id: task-87
|
||||
title: 'Fix Domain::PostsController visual_results spec mock data'
|
||||
status: To Do
|
||||
assignee: []
|
||||
status: Done
|
||||
assignee:
|
||||
- '@assistant'
|
||||
created_date: '2025-08-14'
|
||||
updated_date: '2025-08-14'
|
||||
labels: []
|
||||
dependencies: []
|
||||
---
|
||||
@@ -17,3 +19,7 @@ The visual_results controller spec is failing because it mocks generate_fingerpr
|
||||
- [ ] Test passes with correct template rendering
|
||||
- [ ] Mock data matches expected GenerateFingerprintsResult structure
|
||||
- [ ] No regression in other controller tests
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
Fixed the Domain::PostsController visual_results spec by correcting the mock data structure. The test was mocking generate_fingerprints to return Domain::PostFile::BitFingerprint.none (an empty ActiveRecord relation), but the method actually returns an array of GenerateFingerprintsResult objects. This caused the controller to take the error path and render :visual_search instead of :visual_results. Updated the test to: 1) Mock generate_fingerprints with proper GenerateFingerprintsResult objects containing thumb_path, fingerprint, and detail_fingerprint fields, 2) Added missing mock for create_image_thumbnail_data_uri helper method, 3) Updated variable names to match the new mock structure. All 12 controller tests now pass.
|
||||
|
||||
Reference in New Issue
Block a user