Skip to content

test(profile): earnings register — full coverage#51

Open
1sraeliteX wants to merge 1 commit into
boundlessfi:developfrom
1sraeliteX:test(profile)-earnings-—-register

Hidden character warning

The head ref may contain hidden characters: "test(profile)-earnings-\u2014-register"
Open

test(profile): earnings register — full coverage#51
1sraeliteX wants to merge 1 commit into
boundlessfi:developfrom
1sraeliteX:test(profile)-earnings-—-register

Conversation

@1sraeliteX

@1sraeliteX 1sraeliteX commented Jun 24, 2026

Copy link
Copy Markdown

Summary

Adds 11 tests covering register_earnings() in contracts/profile/src/tests/earnings.rs.

Coverage

Category Test
Happy path register_earnings_succeeds, register_earnings_accumulates
Edge (multi-token/user) register_earnings_multiple_tokens, register_earnings_multiple_users
Error: InvalidAmount register_earnings_rejects_zero, register_earnings_rejects_negative
Error: EventsContractNotConfigured register_earnings_reverts_no_events_contract
Error: Paused register_earnings_reverts_when_paused
Idempotency: OpAlreadySeen register_earnings_rejects_duplicate_op_id
Edge: saturating arithmetic register_earnings_saturating_add
Auth rejection register_earnings_auth_rejection

Verification

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
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dd51a587-342c-47af-92d9-c4b4f2a68fb4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@1sraeliteX

Copy link
Copy Markdown
Author

@0xdevcollins Review and merge PR, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant