Repository navigation
fix: resolve issues #282 #283 #285 — grooming/emergency validation - #356
Merged
iam-mercy merged 2 commits intoOct 20, 2026
Conversation
…ing/emergency validation iam-mercy#282 — EmergencyContact phone OR email required - validate_emergency_contacts now accepts contacts with email only (previously required phone unconditionally) - Condition updated: name must be non-empty AND at least one of phone or email must be non-empty - Renamed test_contact_with_empty_phone_rejected → test_contact_with_email_only_accepted (now a positive test) - Added test_contact_with_blank_phone_and_email_rejected for the actual rejection case iam-mercy#283 — Enforce 90-day advance booking window in book_grooming_slot - Added MAX_ADVANCE_BOOKING_SECS constant (90 * 86_400 seconds) - book_grooming_slot now panics with InvalidInput when start_time > current_time + MAX_ADVANCE_BOOKING_SECS - Added three tests in test_grooming_slot_booking.rs: - test_booking_180_days_in_advance_rejected - test_booking_at_90_day_boundary_accepted - test_booking_one_second_past_90_day_limit_rejected iam-mercy#285 — Validate rating score range 1–5 in rate_groomer - Validation was already implemented (!(1..=5).contains(&score)) - Added missing unit tests in test_grooming.rs: - test_rate_groomer_score_zero_rejected (score=0 panics) - test_rate_groomer_score_six_rejected (score=6 panics) - test_rate_groomer_valid_scores_accepted (1–5 all pass) Bonus fix: add GroomerNotVerified = 172 to ContractError enum (was referenced in book_grooming_slot but missing from enum, causing a pre-existing compile error) .gitignore: deduplicate and clean up redundant entries
|
@chibeike-AI Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
#282 — EmergencyContact phone OR email required
#283 — Enforce 90-day advance booking window in book_grooming_slot
#285 — Validate rating score range 1–5 in rate_groomer
Bonus fix: add GroomerNotVerified = 172 to ContractError enum (was referenced in book_grooming_slot but missing from enum, causing a pre-existing compile error)
.gitignore: deduplicate and clean up redundant entries
closes
closes #282
closes #283
closes #285