Skip to content

Move the notifications controller spec into a request spec - #1297

Merged
amatsuda merged 1 commit into
rubycentral:mainfrom
amatsuda:notifications_request_spec
Nov 19, 2026
Merged

amatsuda merged 1 commit into
rubycentral:mainfrom
amatsuda:notifications_request_spec

Conversation

@amatsuda

Copy link
Copy Markdown
Collaborator

Summary

Fourth per-file conversion. spec/controllers/notifications_controller_spec.rb is deleted.

Controller example Now
show sets the notification as read already covered: notification_spec "can click a notification to see and it is automatically marked as read"
mark_all_as_read marks all unread notifications as read already covered: notification_spec "can mark all as read" (page) and "can mark all notifications as read from dropdown link"
redirects an unauthenticated user new spec/requests/notifications_spec.rb: a signed-out visitor is sent to the sign-in page

Test

bin/rspec spec/requests/notifications_spec.rb spec/system/notification_spec.rb: 10 examples, 0 failures.

🤖 Generated with Claude Code

Two of its three examples were already covered through the pages in
spec/system/notification_spec.rb: opening a notification marks it read,
and "Mark all as read" clears them. The remaining one, a signed-out
visitor being sent to the sign-in page, is HTTP plumbing with no page of
its own, so it becomes a request spec.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@amatsuda
amatsuda merged commit e882040 into rubycentral:main Nov 19, 2026
2 checks passed
@amatsuda
amatsuda deleted the notifications_request_spec branch November 19, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant