Skip to content

Commit

Permalink
Implement GetMaxBorrowAndWithdrawUSDCAmount test
Browse files Browse the repository at this point in the history
  • Loading branch information
EridianAlpha committed Jun 25, 2024
1 parent 7a60550 commit dd7b305
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions test/unit/AavePM/GetterTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,20 @@ contract AavePMGetterTests is AavePMTestSetup {
assertEq(aavePM.getSuppliedCollateralTotal(), suppliedCollateral);
}

// TODO: Implement this test
// function test_GetMaxBorrowAndWithdrawUSDCAmount() public {
// }
function test_GetMaxBorrowAndWithdrawUSDCAmount() public {
// Check initial maxBorrowAndWithdrawUSDCAmount is 0
assertEq(aavePM.getMaxBorrowAndWithdrawUSDCAmount(), 0);

// Send ETH from manager1 to the contract
vm.startPrank(manager1);
sendEth(address(aavePM), SEND_VALUE);

// Supply ETH to Aave
aavePM.aaveSupplyFromContractBalance();

// Check that the maxBorrowAndWithdrawUSDCAmount is greater than 0
assert(aavePM.getMaxBorrowAndWithdrawUSDCAmount() > 0);
}

function test_GetReinvestableAmount() public {
// Check initial reinvestable amount is 0.
Expand Down

0 comments on commit dd7b305

Please sign in to comment.