Skip to content

Commit

Permalink
enhance fixed rewards pool tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ququzone committed Oct 24, 2024
1 parent 0624c30 commit 5a350de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/FixedRewardPool.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,16 @@ contract TestFixedRewardPool is Test {
fixedRewardPool.withdraw(1);
assertEq(bob.balance, 0.225 ether);
assertEq(testNFT.ownerOf(1), bob);
fixedRewardPool.claimRewards(alice);
assertEq(alice.balance, 0.075 ether);
assertEq(alice.balance, 0.05 ether);
assertEq(fixedRewardPool.totalStakedWeight(), 100);
assertEq(fixedRewardPool.tokenWeight(1), 0);

vm.roll(15);
assertEq(fixedRewardPool.pendingReward(bob), 0);
fixedRewardPool.claimRewards(alice);
assertEq(alice.balance, 0.075 ether);

vm.roll(20);
vm.prank(alice);
fixedRewardPool.withdraw(3);
assertEq(alice.balance, 0.075 ether);
Expand Down

0 comments on commit 5a350de

Please sign in to comment.