dawarich/spec/requests
Claude 9fba3ce4ca
Refactor: Move trip sharing management to trips#update
Simplifies architecture by using the existing trips#update route for
sharing settings management instead of a separate route.

## Changes

**Routes**
- Removed: PATCH /trips/:id/sharing → shared/trips#update
- Now uses: PATCH /trips/:id (existing route) with sharing params

**Controllers**
- Shared::TripsController: Simplified to only handle public view (show)
- TripsController: Added update_sharing private method to handle
  sharing params when present

**Views**
- Updated JavaScript in _sharing.html.erb to use trip_path with
  nested sharing params

**Tests**
- Updated request specs to use trip_path instead of sharing_trip_path
- All params now nested under sharing key

## Benefits
- Cleaner namespace separation (Shared:: only for public access)
- Follows Rails conventions (one update route handles everything)
- Simpler routing structure
- Reduced code duplication

## Backwards Compatibility
This is a breaking change for the sharing API endpoint, but since
this feature was just implemented and hasn't been released yet,
no migration path is needed.
2025-11-05 15:54:42 +00:00
..
api/v1 Fix failed specs 2025-09-23 00:18:04 +02:00
family Refactor family invitations and memberships into separate models and controllers 2025-10-07 18:38:06 +02:00
settings Fix failing specs 2025-09-13 17:46:45 +02:00
shared Refactor: Move trip sharing management to trips#update 2025-11-05 15:54:42 +00:00
users Move UTM parameter tracking logic into a concern 2025-10-30 19:59:31 +01:00
authentication_spec.rb Make sure family invitations are handled after sign-in 2025-10-22 21:36:51 +02:00
exports_spec.rb Extract stats sharing logic to its own controller 2025-09-12 21:08:45 +02:00
families_spec.rb Refactor family invitations and memberships into separate models and controllers 2025-10-07 18:38:06 +02:00
family_workflows_spec.rb Refactor family invitations and memberships into separate models and controllers 2025-10-07 18:38:06 +02:00
home_spec.rb Enable home spec back 2025-05-18 11:45:45 +02:00
imports_spec.rb Fix tests 2025-09-13 12:28:43 +02:00
map_spec.rb Introduce uniqueness index and validation for points 2025-01-20 17:59:13 +01:00
notifications_spec.rb Add spec for marking all notifications as read 2024-07-04 23:01:24 +02:00
places_spec.rb Add places page 2024-08-25 20:19:02 +02:00
points_spec.rb Add spec for no points selected. 2025-07-26 14:46:53 +02:00
settings_spec.rb Fixes for visits suggestions. 2025-07-02 23:50:32 +02:00
sidekiq_spec.rb Return sidekiq and redis to Dawarich 2025-06-09 13:39:25 +02:00
stats_spec.rb Extract hexagon query to separate class 2025-09-12 21:38:25 +02:00
trips_spec.rb Extract stats sharing logic to its own controller 2025-09-12 21:08:45 +02:00
users_spec.rb Fix tests 2025-10-04 20:31:36 +02:00
visits_spec.rb Fix specs 2024-12-11 14:42:26 +01:00