Skip to content

test: add assert_no_events helper and apply to failed transactions#361

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Johnsmichael150:main
May 30, 2026
Merged

test: add assert_no_events helper and apply to failed transactions#361
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Johnsmichael150:main

Conversation

@Johnsmichael150
Copy link
Copy Markdown

Summary

  • Added a new test helper assert_no_events(&Env) in creator-keys/src/test.rs.
  • Applied the helper to existing failed transaction tests to explicitly verify that no side-effect events are emitted on contract errors.
  • Tests updated:
    • test_duplicate_registration_fails
    • test_buy_key_fails_if_not_registered
    • test_buy_key_insufficient_payment
    • test_set_key_price_invalid_amount

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace (All 89 tests passed)

Checklist

  • Linked issue or backlog item
  • Contract behavior and invariants are described clearly
  • Docs updated if contract interfaces or workflows changed
  • Scope stays limited to one contract concern (Event validation)

Linked Issues

Close #356
Close #321
Close #320
Close #318

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@Johnsmichael150 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! 🚀

Learn more about application limits

@Chucks1093 Chucks1093 merged commit 6f5e011 into accesslayerorg:main May 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants