Repository navigation
Fix NoMethodError: undefined method 'reindex' for class Photo in specs - #4678
Conversation
The Photo model is no longer using Searchkick/Elasticsearch, so calling `Photo.reindex` causes a NoMethodError. This commit removes these calls from `spec/spec_helper.rb` and feature specs, and removes the unused `:reindex` trait from the photo factory call in `likeable_spec.rb`. Co-authored-by: CloCkWeRX <[email protected]>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Remove `Photo.reindex` calls from `spec/spec_helper.rb` and feature specs. - Modify `LikesController` to conditionally call `reindex` only if the likeable object responds to it, preventing `NoMethodError` for non-indexed models like `Photo`. - Remove unnecessary `:reindex` trait from photo factory call in `likeable_spec.rb`. Co-authored-by: CloCkWeRX <[email protected]>
Removed
Photo.reindexcalls fromspec/spec_helper.rb,spec/features/home/home_spec.rb, andspec/features/likeable_spec.rbto fixNoMethodError. Also removed the unnecessary:reindextrait from the photo factory call inspec/features/likeable_spec.rb. Verified that the Photo model is decoupled from Elasticsearch and that these calls were indeed erroneous.PR created automatically by Jules for task 4629481995101950332 started by @CloCkWeRX