Skip to content

Commit

Permalink
fix: tests coverage for recovering bad debt
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSolDev committed Feb 15, 2025
1 parent b1d9103 commit fb17c3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/SelfPeggingAsset.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,12 @@ contract SelfPeggingAssetTest is Test {
_pool.distributeLoss();

assertIsCloseTo(_lpToken.totalSupply(), 113e18, 1e18);

// Recover bad debt
assertNotEq(_lpToken.bufferBadDebt(), 0);
rETHExchangeRateProvider.newRate(1e18);
_pool.rebase();
assertEq(_lpToken.bufferBadDebt(), 0);
}

function assertFee(uint256 totalAmount, uint256 feeAmount, uint256 fee) internal view {
Expand Down

0 comments on commit fb17c3d

Please sign in to comment.