Fix crew specs: expect /login redirect (matches PR #151 hotfix) #163
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-crew-spec-redirect-targets"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fix two failing specs that still expected redirect to
/auth/keycloakinstead of/loginafter PR #151 changed the unauthenticated redirect target.Changes
spec/requests/crew_spec.rbline 95: changedredirect_to("/auth/keycloak")toredirect_to("/login")spec/requests/role_access_spec.rbline 49: changedredirect_to("/auth/keycloak")toredirect_to("/login")Test Plan
/loginand are unaffectedRelated
PR #163 Review
DOMAIN REVIEW
Tech stack: Ruby on Rails request specs (RSpec)
Correctness analysis:
The application controller (
app/controllers/application_controller.rb, line 52) defines:And
config/routes.rbline 8 maps:The redirect target
/loginin the specs is correct. This matches the behavior introduced in PR #151.Completeness analysis:
I searched every request spec file in the repository:
spec/requests/crew_spec.rb-- uses/login(after this fix)spec/requests/role_access_spec.rb-- uses/login(after this fix)spec/requests/sessions_spec.rb-- usespost "/auth/keycloak"(correct -- this is the OmniAuth route, not a redirect target)spec/requests/person_spec.rb-- already uses/loginspec/requests/platform/feature_flags_spec.rb-- already uses/loginspec/requests/properties_spec.rb-- no auth redirect testsspec/requests/work_queue_items_spec.rb-- no auth redirect testsspec/requests/weeks_spec.rb-- no auth redirect testsspec/requests/uploads_spec.rb-- no auth redirect testsspec/requests/client_errors_spec.rb-- no auth redirect testsNo remaining occurrences of
redirect_to("/auth/keycloak")exist anywhere in the spec directory. The fix is complete.BLOCKERS
None.
NITS
itdescription on crew_spec.rb line 93 still reads "redirects unauthenticated users to Keycloak" and role_access_spec.rb line 48 reads "redirects /crew/:id to Keycloak login". These are slightly misleading now that the redirect goes to/login(an intermediate login page) rather than directly to the OmniAuth endpoint. A more accurate description would be "redirects unauthenticated users to login". Non-blocking since the actual assertion is correct.SOP COMPLIANCE
fix-crew-spec-redirect-targets(no issue number prefix; appears to be a hotfix without a standalone issue)PROCESS OBSERVATIONS
This is a targeted fix for a pipeline failure. The scope is minimal and correct. The two-line change aligns perfectly with the application's actual behavior. No deployment risk -- this only affects test assertions.
VERDICT: APPROVED