Skip to content

Commit

Permalink
test(strategy): Update assertion in test_collectInterest() for all st…
Browse files Browse the repository at this point in the history
…rategy tests
  • Loading branch information
YashP16 committed Jan 19, 2024
1 parent d0a6904 commit 64b48d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions test/strategy/CompoundStrategy.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,7 @@ contract CollectInterestTest is CompoundStrategyTest {
strategy.collectInterest(ASSET);

uint256 current_bal = IERC20(ASSET).balanceOf(yieldReceiver);
uint256 newInterestEarned = strategy.checkInterestEarned(ASSET);

assertEq(newInterestEarned, 0);
assertApproxEqAbs(strategy.checkInterestEarned(ASSET), 0, 1);
assertEq(current_bal, (initial_bal + harvestAmount));
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/strategy/StargateStrategy.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ contract Test_CollectInterest is Test_Harvest {
vm.recordLogs();

strategy.collectInterest(assetData[i].asset);
assertApproxEqAbs(strategy.checkInterestEarned(assetData[i].asset), 0, 1);

VmSafe.Log[] memory logs = vm.getRecordedLogs();

Expand All @@ -505,7 +506,6 @@ contract Test_CollectInterest is Test_Harvest {

/// @note precision Error from stargate
assertApproxEqAbs(strategy.checkLPTokenBalance(assetData[i].asset), initialLPBal, 1);
assertEq(strategy.checkInterestEarned(assetData[i].asset), 0);
}
}

Expand Down

0 comments on commit 64b48d8

Please sign in to comment.