test: governance, credential renewal/revocation-reason, course archiving coverage - #377
Merged
DeFiVC merged 2 commits intoAug 30, 2026
Conversation
…ons, course archiving - tests/unit/token_tests.rs: full governance proposal lifecycle (create_proposal, voting power via balance, vote, execute_proposal). - tests/unit/credential_tests.rs: renew_credential extends expiry; revoke_credential_with_reason stores a queryable reason. - tests/unit/progress_tests.rs: archive_course rejects new enrollments while preserving existing learner progress. Written under a hard time constraint from existing setup helpers and contract signatures found via grep, not verified with cargo test in this pass — please run CI/cargo test on this PR before merging. Closes ChainLearnOfficial#296 Closes ChainLearnOfficial#297 Closes ChainLearnOfficial#298 Closes ChainLearnOfficial#299
|
@leojay-net 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.
Adds the 4 requested test cases:
tests/unit/token_tests.rs(create_proposal → voting power via balance → vote → execute_proposal).renew_credentialextends expiry intests/unit/credential_tests.rs.revoke_credential_with_reasonstores a queryable reason intests/unit/credential_tests.rs.archive_courserejects new enrollments while preserving existing progress intests/unit/progress_tests.rs.Note: written under a hard time constraint directly from existing setup helpers and contract signatures (grep only) — not run through
cargo testin this pass. Please run CI on this PR before merging; happy to fix up any compile/assertion issues that surface.Closes #296
Closes #297
Closes #298
Closes #299