Skip to content

Commit

Permalink
re-add removed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hexonaut committed Aug 27, 2024
1 parent 9aab227 commit b27a96f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/tests/pools/D3MAaveV3NSTNoSupplyCapTypePool.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,29 @@ contract D3MAaveV3NSTNoSupplyCapTypePoolTest is D3MPoolBaseTest {
assertEq(code, 0);
}

function test_withdraw_calls_lending_pool_withdraw() public {
// make sure we have Nst to withdraw
TokenMock(address(nst)).mint(address(aavePool), 1);

vm.prank(address(hub)); pool.withdraw(1);
(address asset, uint256 amt, address dst) = FakeLendingPool(address(aavePool)).lastWithdraw();
assertEq(asset, address(nst));
assertEq(amt, 1);
assertEq(dst, address(pool));
}

function test_withdraw_calls_lending_pool_withdraw_vat_caged() public {
// make sure we have Nst to withdraw
TokenMock(address(nst)).mint(address(aavePool), 1);

vat.cage();
vm.prank(address(hub)); pool.withdraw(1);
(address asset, uint256 amt, address dst) = FakeLendingPool(address(aavePool)).lastWithdraw();
assertEq(asset, address(nst));
assertEq(amt, 1);
assertEq(dst, address(pool));
}

function test_collect_claims_for_king() public {
address king = address(123);
address rewardsClaimer = anst.getIncentivesController();
Expand Down

0 comments on commit b27a96f

Please sign in to comment.