Skip to content

test(learn-token): add get_vesting_claimed unit tests (fixes #634) - #652

Closed
lmduy2612 wants to merge 1 commit into
ChainLearnOfficial:mainfrom
lmduy2612:test/issue-634-get-vesting-claimed-tests
Closed

lmduy2612 wants to merge 1 commit into
ChainLearnOfficial:mainfrom
lmduy2612:test/issue-634-get-vesting-claimed-tests

Conversation

@lmduy2612

Copy link
Copy Markdown

Closes #634.

Summary of Changes

Adds comprehensive unit tests for get_vesting_claimed in contracts/learn-token:

  • Beneficiary with no vesting: verifies returning 0 (test_get_vesting_claimed_returns_zero_for_beneficiary_with_no_vesting).
  • Before any claims: verifies returning 0 when a vesting schedule exists but before any claims are executed (test_get_vesting_claimed_returns_zero_before_any_claims).
  • After claiming: verifies returning correct claimed amount after a partial claim milestone (test_get_vesting_claimed_returns_correct_amount_after_claiming).
  • Multiple claims accumulation: verifies claimed amount accumulates accurately across multiple milestones up to 100% full vesting (test_get_vesting_claimed_accumulates_across_multiple_claims).

Verification

  • cargo test --test token_tests test_get_vesting_claimed: 4/4 tests pass.
  • Adheres strictly to project coding standards and test conventions.

@DeFiVC DeFiVC closed this Oct 19, 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.

Add get_vesting_claimed unit tests

2 participants