Fix plantings ICS feed regression and enable request spec#4687
Conversation
- Update `app/views/plantings/index.ics.erb` to use ActiveRecord method calls instead of hash bracket access. - Enable `spec/requests/plantings_spec.rb` and update it to account for mirrored harvest events. - Add `config/initializers/faraday_patch.rb` to fix Searchkick/Faraday 2.x compatibility issues. Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
|
👋 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. |
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
This PR fixes the regression in the plantings ICS feed that occurred after migrating the
PlantingsControllerfrom Elasticsearch to ActiveRecord.Key changes:
app/views/plantings/index.ics.erbto access attributes via method calls (e.g.,planting.quantity) rather than hash keys (e.g.,planting['quantity']). This ensures compatibility with ActiveRecord objects returned by the controller. It also correctly handlesDateandTimeobjects.pendingstatus from the ICS request spec inspec/requests/plantings_spec.rb. Updated the test to correctly account for the mirrored 'Harvest' events generated for future plantings, bringing the expected event count to 7.config/initializers/faraday_patch.rbto provide a compatibility shim for Searchkick when running with Faraday 2.x, which moved some error classes.These changes ensure the plantings calendar feed is functional and properly tested.
PR created automatically by Jules for task 925842142388956801 started by @CloCkWeRX