Background
spec/requests/case_contacts_spec.rb:165 has a disabled spec block:
xdescribe \"GET /leave\" do
subject(:request) do
get leave_case_contact_path
response
end
it { is_expected.to redirect_to(case_contacts_path) }
it \"redirects back to referer or fallback location\" do
request
expect(response).to redirect_to(case_contacts_path)
end
end
Why it's disabled
The spec calls `leave_case_contact_path` (singular, no suffix), but the route is declared as:
# config/routes.rb:83
get \"case_contacts/leave\", to: \"case_contacts#leave\", as: \"leave_case_contacts_form\"
The actual path helper is `leave_case_contacts_form_path`, not `leave_case_contact_path`. The route was renamed/restructured at some point and the spec was disabled instead of updated.
The action itself still exists at `app/controllers/case_contacts_controller.rb:66`:
def leave
redirect_back_to_referer(fallback_location: case_contacts_path)
end
What to do
- Replace
xdescribe with describe.
- Update the path helper to
leave_case_contacts_form_path.
- Verify both examples pass.
- While you're here: the second example duplicates the first (`is_expected.to redirect_to(case_contacts_path)` is the same assertion). Consider removing the `it { is_expected.to ... }` shorthand or merging.
Acceptance criteria
Background
spec/requests/case_contacts_spec.rb:165has a disabled spec block:Why it's disabled
The spec calls `leave_case_contact_path` (singular, no suffix), but the route is declared as:
The actual path helper is `leave_case_contacts_form_path`, not `leave_case_contact_path`. The route was renamed/restructured at some point and the spec was disabled instead of updated.
The action itself still exists at `app/controllers/case_contacts_controller.rb:66`:
What to do
xdescribewithdescribe.leave_case_contacts_form_path.Acceptance criteria