Feature/tests pause vesting admin content hash - #384
Merged
DeFiVC merged 5 commits intoAug 31, 2026
Merged
Conversation
…earnOfficial#281) Tests that emergency pause works on learn-token, progress-tracker, and credential-nft: pause prevents state changes (transfers, minting, burning, enrollment, module completion, quiz submissions, credential minting), unpause restores operations, read-only functions still work while paused, and pause/unpause events are emitted.
Tests multiple admins with distinct roles (Minter, Pauser, Admin), verifies each role is enforced independently, tests role revocation removes access, and confirms role_granted/role_revoked events are emitted. Also tests the grant_role/revoke_role lifecycle.
…Official#250) Tests that courses have content hashes (defaulting to 'none'), hashes can be set and updated, hashes are queryable via get_course_content_hash and get_course, enroll skips verification (optional), enroll_checked accepts matching hashes, rejects mismatched hashes, and skips verification when the hash is unset or None is passed.
Adds [[test]] entries for emergency_pause_flow, token_vesting_flow, multi_admin_flow, and content_hash_flow integration tests.
|
@dev-markdavid 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues Resolved
Changes
File Issue Description
tests/integration/emergency_pause_flow.rs . Add integration test for emergency pause #281 Tests pause/unpause across all 3 contracts: learn-token, progress-tracker, credential-nft. Verifies state changes revert when paused, operations resume after unpause, read-only functions work while paused, and events are emitted.
tests/integration/token_vesting_flow.rs . Add test for token vesting #280 Tests full vesting lifecycle: schedule creation, cliff enforcement, linear vesting at 50%/100%, claiming, exhaustion, and beneficiary-only access. Verifies vesting events.
tests/integration/multi_admin_flow.rs . Add test for multi-admin support #279 Tests multiple admins with Minter/Pauser/Admin roles, role enforcement, role revocation, and event emission.
tests/integration/content_hash_flow.rs . Add course content hash verification #250 Tests content hash defaults, set/update, events, optional verification in enrollment, matching/mismatched hash checks.
Cargo.toml All Registers the 4 new test targets.
Linked issues