Skip to content

test: add missing pause/unpause unit tests in attester-registry - #307

Open
Xaxxoo wants to merge 1 commit into
Lafiya-xyz:mainfrom
Xaxxoo:fix/issue-151-pause-unpause-tests
Open

test: add missing pause/unpause unit tests in attester-registry#307
Xaxxoo wants to merge 1 commit into
Lafiya-xyz:mainfrom
Xaxxoo:fix/issue-151-pause-unpause-tests

Conversation

@Xaxxoo

@Xaxxoo Xaxxoo commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds is_paused_reflects_state_transitions test verifying is_paused() returns correct values through the full pause → unpause lifecycle
  • Adds pause_by_non_admin_fails test ensuring only the admin can pause the contract (non-admin auth is rejected)
  • Adds unpause_by_non_admin_fails test ensuring only the admin can unpause the contract (non-admin auth is rejected)

Test plan

  • cargo test passes for attester-registry crate
  • New tests fail if require_auth() calls are removed from pause()/unpause()
  • New tests fail if is_paused() logic is broken

Closes #151

🤖 Generated with Claude Code

Adds three new tests:
- is_paused_reflects_state_transitions: verifies is_paused() returns correct values through pause/unpause lifecycle
- pause_by_non_admin_fails: ensures only admin can pause the contract
- unpause_by_non_admin_fails: ensures only admin can unpause the contract

Closes Lafiya-xyz#151
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.

Add missing pause/unpause unit tests in attester-registry

1 participant