test(profile): earnings register — full coverage#51
Hidden character warning
Conversation
Adds 11 tests covering register_earnings: - Happy path: single, accumulate - Edge cases: multi-token, multi-user, saturating add - Error variants: InvalidAmount (zero/negative), EventsContractNotConfigured, Paused, OpAlreadySeen - Auth rejection: caller without events contract auth
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@0xdevcollins Review and merge PR, thanks! |
Summary
Adds 11 tests covering
register_earnings()incontracts/profile/src/tests/earnings.rs.Coverage
register_earnings_succeeds,register_earnings_accumulatesregister_earnings_multiple_tokens,register_earnings_multiple_usersInvalidAmountregister_earnings_rejects_zero,register_earnings_rejects_negativeEventsContractNotConfiguredregister_earnings_reverts_no_events_contractPausedregister_earnings_reverts_when_pausedOpAlreadySeenregister_earnings_rejects_duplicate_op_idregister_earnings_saturating_addregister_earnings_auth_rejectionVerification
cargo test -p boundless-profile— 24 passedcargo test --all— 100 passedCloses test(profile): earnings register — full coverage #51