Skip to content

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

Merged
ink-mami merged 2 commits into
Lafiya-xyz:mainfrom
Xaxxoo:fix/issue-151-pause-unpause-tests
Sep 4, 2026
Merged

test: add missing pause/unpause unit tests in attester-registry#307
ink-mami merged 2 commits 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

Xaxxoo and others added 2 commits August 30, 2026 13:38
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
@ink-mami
ink-mami merged commit 49424aa into Lafiya-xyz:main Sep 4, 2026
1 of 7 checks 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

Development

Successfully merging this pull request may close these issues.

Add missing pause/unpause unit tests in attester-registry

2 participants