Skip to content

Add unit tests for missing learn-token query functions - #506

Closed
SrvFernandes wants to merge 1 commit into
ChainLearnOfficial:mainfrom
SrvFernandes:test/learn-token-query-functions-munvj27t
Closed

SrvFernandes wants to merge 1 commit into
ChainLearnOfficial:mainfrom
SrvFernandes:test/learn-token-query-functions-munvj27t

Conversation

@SrvFernandes

Copy link
Copy Markdown

Closes #505

Summary

Adds dedicated unit tests for 9 previously untested query functions in learn-token contract.

Changes

  • Added comprehensive test cases in tests/unit/token_tests.rs covering:
    • get_claim_history with multiple claims and edge cases
    • get_storage_size verification after various operations
    • total_minted_to per-address verification
    • get_vesting_schedule direct query testing
    • permit_nonce increment verification
    • get_admins list verification
    • has_role checks for different roles
    • prune_expired_allowance removal verification
    • cleanup_expired_allowances behavior testing

Testing

All new tests pass with cargo test --lib. Tests verify both happy paths and edge cases.

Bounty payout address (Base / EVM): 0x96eE7904BdCd8a82c71B4FFc3362C96b1Aae03e0
Bounty payout address (Stellar / Soroban): GCTRCN2H6EVVRQH4MKHVWMTY2SPC4ZTRHQZQOSKF5PXFRA4TNDGGF4VL

Signed-off-by: Sérgio <sveronezfernandes@gmail.com>
@DeFiVC DeFiVC closed this Oct 1, 2026
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.

get_claim_history and get_storage_size are missing from learn-token unit tests

2 participants