Skip to content

Commit

Permalink
Claim reward bug test (#924)
Browse files Browse the repository at this point in the history
## Describe your changes
Claim reward bug test.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Tests**
- Enhanced test coverage for the scenario where rewards have already
been claimed, ensuring robustness.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
Gauthamastro authored Mar 7, 2024
2 parents ecaff31 + 5c18fb7 commit e5f262f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pallets/ocex/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2468,6 +2468,7 @@ fn test_do_claim_lmp_rewards_happy_path() {
assert_eq!(Balances::free_balance(&main_account), 999999999900u128);
assert_ok!(OCEX::do_claim_lmp_rewards(main_account.clone(), epoch, trading_pair));
assert_eq!(Balances::free_balance(&main_account), 200999999999900u128);
assert_noop!(OCEX::do_claim_lmp_rewards(main_account.clone(), epoch, trading_pair), Error::<Test>::RewardAlreadyClaimed);
})
}

Expand Down

0 comments on commit e5f262f

Please sign in to comment.