Skip to content

test(contract): add notification validation tests, closes #102#121

Open
oche2920 wants to merge 1 commit into
Core-Foundry:mainfrom
oche2920:feat/issue-102-notification-validation-tests
Open

test(contract): add notification validation tests, closes #102#121
oche2920 wants to merge 1 commit into
Core-Foundry:mainfrom
oche2920:feat/issue-102-notification-validation-tests

Conversation

@oche2920

Copy link
Copy Markdown

Closes #102

Adds notification_validation_test.rs with 36 tests covering all
payload validation rules across every contract entry point.

  • Invalid payloads: zero usages, name too long, unsupported token,
    bad percentages, empty/duplicate members
  • Boundary values: 100-char name, 50-member cap, single 100% member
  • Paused-state rejections on update/activate/deactivate
  • State conflicts: double-deactivate/activate, update on inactive group
  • Authorization failures for non-creator callers
  • Topup/withdrawal/fee/token management validation
  • Event integrity: correct category and payload on success paths

test result: ok. 141 passed; 0 failed; 0 ignored

…y#102

- Add notification_validation_test.rs with 36 tests covering all
  payload validation rules across every contract entry point
- Tests cover: invalid payloads (zero usages, name too long,
  unsupported token, bad percentages), paused-state rejections,
  state-conflict checks, authorization failures, topup/withdrawal
  validation, boundary values (50-member cap, 100-char name limit),
  and event category/payload integrity
- Register the new test module in lib.rs
- Auto-format autoshare_test.rs via cargo fmt (trailing whitespace
  and argument list formatting)
@Abd-Standard

Copy link
Copy Markdown
Collaborator

please fix Ci checks

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.

[Testing] Increase Coverage for Notification Validation Rules

2 participants