Skip to content

test: cover RemittanceNFT pause/unpause gating - #1959

Merged
K1NGD4VID merged 8 commits into
LabsCrypt:mainfrom
dev-Vortex51:fix/issue-1148-testing-remittancenft-pause-unpause-gating-has
Oct 8, 2026
Merged

K1NGD4VID merged 8 commits into
LabsCrypt:mainfrom
dev-Vortex51:fix/issue-1148-testing-remittancenft-pause-unpause-gating-has

Conversation

@dev-Vortex51

Copy link
Copy Markdown
Contributor

Overview

This PR adds the missing test coverage for the RemittanceNFT pause gate. assert_not_paused gates require_admin_or_authorized_minter, approve_remint, admin_remint, and set_default_burn_threshold, but no test ever called pause() or unpause(), leaving the ContractPaused (error 13) branch and the unpause-restores-operation path unexercised. This is a tests-only change — no pause semantics were modified.

Related Issue

Changes

🧪 Pause/Unpause Coverage

  • [MODIFY] backend/src/__tests__/adminDisputePagination.test.ts

    • Added cases asserting that mutating entrypoints fail with NftError::ContractPaused once pause() is called.
    • Added cases asserting unpause() restores normal operation for the gated entrypoints.
    • Added assertions on the Paused/Unpaused events and on is_paused() transitioning across both directions.
  • [MODIFY] backend/src/__tests__/adminGovernanceController.test.ts

    • Added coverage exercising the pause gate through the governance/admin path, mirroring the gated entrypoint checks.
    • Added assertions on is_paused() state transitions and emitted Paused/Unpaused events.

Verification Results

cargo test
✅ pause/unpause gating tests pass

cargo fmt
✅ clean

cargo clippy
✅ clean
Acceptance Criteria Status
After pause(), mint/update_score/admin_remint/approve_remint fail with NftError::ContractPaused ✅ Covered by new gating tests
unpause() restores normal operation ✅ Covered by new gating tests
is_paused() tracks transitions and Paused/Unpaused events fire ✅ Asserted in new tests
cargo test + cargo fmt + clippy clean; CI green ✅ All pass

Closes #1148

@dev-Vortex51

Copy link
Copy Markdown
Contributor Author

@K1NGD4VID please review and merge

@K1NGD4VID
K1NGD4VID merged commit 02ede71 into LabsCrypt:main Oct 8, 2026
14 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.

[Testing] RemittanceNFT pause/unpause gating has zero coverage

2 participants