5563 - Replace notification spec stubs with real tests#7072
Open
fuentesjr wants to merge 4 commits into
Open
Conversation
fuentesjr
requested review from
FireLemons,
compwron and
elasticspoon
as code owners
July 18, 2026 07:06
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.
What github issue is this PR for, if any?
Part of #5563, intentionally not
Resolves, since the umbrella has more stubs remaining.What changed, and why?
Replaces the four
pending "add some tests for X"stubs inspec/notifications/with real specs (one commit per file), following the patterns involunteer_birthday_notifier_spec.rb,reimbursement_complete_notifier_spec.rb, andemancipation_checklist_reminder_notifier_spec.rb:title/message/urleach raiseNotImplementedErroron the base, plus the utility methods (read?,created_at,updated_at,created_by) that delegate torecord/params, including both branches ofcreated_by(theparams[:created_by]path and the legacyparams[:created_by_name]fallback)title,url, and bothmessagebranches (with a note, joined on newlines; without, joined on spaces)title,message, andurlin both the persisted and unsaved statestitle,message, andurlThese characterize current behavior; no app code changed. Three
# NOTE:comments flag oddities left as-is for a separate change: theNotImplementedErrormessage string inbase_notifier.rbis missing its closing quote;FollowupResolvedNotifier#messagecalls the privatecreated_by_namedirectly whileFollowupNotifieruses the publiccreated_by; andFollowupResolvedNotifier#url'snotification_idparam silently drops when the notifier is unsaved (Rails omits nil query params).One thing worth knowing for reviewers: these specs use
create, notbuild, for any record passed into.with(...). Noticed serializesparamsthrough a jsonb column via GlobalID, and that round-trips on the first read ofparams, so an unsaved record raisesActiveJob::SerializationError. Only assertions that never touchparams(for example a baretitle) can usebuild.How is this tested? (please write rspec and jest tests!) 💖💪
bundle exec rspec spec/notifications/base_notifier_spec.rb spec/notifications/followup_notifier_spec.rb spec/notifications/followup_resolved_notifier_spec.rb spec/notifications/youth_birthday_notifier_spec.rbgives 19 examples, 0 failures, 0 pendingbundle exec standardrb spec/notifications/reports no offensespending/skip/xitremains in the four filesScreenshots please :)
N/A, test-only change, no UI.