Repository navigation
Remove the comments controller spec - #1296
Merged
amatsuda merged 1 commit intoNov 19, 2026
Merged
Conversation
Each of its five examples already has a home that exercises the real code path: - public and internal comment creation, with the redirect back to the proposal, in spec/requests/comments_spec.rb, which also covers the authorization cases the controller spec never did - the speaker email on a public comment, including one email addressed to every speaker, in spec/models/public_comment_spec.rb, where the mailer is actually invoked - internal comments only ever emailing a mentioned teammate, in spec/models/internal_comment_spec.rb Co-Authored-By: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Third per-file conversion, and this one is a pure deletion: every example in
spec/controllers/comments_controller_spec.rbalready has a home that exercises the real code path.spec/requests/comments_spec.rb"can post a public comment" (speaker and staff), which also checks the redirect back to the proposal and the authorization cases the controller spec never didspec/requests/comments_spec.rb"can post an internal comment"spec/models/public_comment_spec.rb#send_emails: one delivery addressed to every speaker. The mailer is invoked from the model'safter_create, so that is where it belongs; the controller spec was stubbing it with a double.spec/models/internal_comment_spec.rb: internal comments email only a mentioned teammate, and not even them when the preference is in-app onlyTest
bin/rspec spec/requests/comments_spec.rb spec/models/public_comment_spec.rb spec/models/internal_comment_spec.rb: 27 examples, 0 failures.🤖 Generated with Claude Code