Repository navigation
Merged
Conversation
Cover ContestInstance#award_notice_entries inclusion/exclusion rules and send_award_notices empty/include_amounts/preferences edge cases so the wrong applicants are not emailed after awards changes. Co-authored-by: rsmoke <rsmoke@umich.edu>
Add award notice recipient and send-path regression coverage
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Tighten the controller expectation to verify the specific recipient and exact call count.
Review effort: Lite
Findings: None
What changed in this PR
Adds controller and model test coverage for award notice eligibility, preferences, delivery, and empty-recipient handling.
Changes:
- Tests eligible and excluded notice recipients.
- Tests amount preferences and alert behavior.
- Tests recipient loading for email preferences.
| File | Summary |
|---|---|
spec/models/contest_instance_spec.rb |
Covers award notice entry eligibility rules. |
spec/controllers/contest_instances_controller_spec.rb |
Covers notice sending and recipient loading. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch was successfully deployed
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.
This pull request adds comprehensive test coverage for the award notice functionality in both the controller and model layers. The main focus is verifying correct behavior when sending award notices, handling user preferences, and ensuring only eligible entries are included as recipients.
Controller test additions:
Model test additions:
award_notice_entriesmethod inContestInstance, confirming it includes winners, finalists, and entries with assigned prizes, while excluding unawarded entries and soft-deleted winners.