Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrade committed Nov 10, 2024
1 parent 9c540e3 commit 619129f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/unit/DSCEngineTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,15 @@ contract DSCEngineTest is Test {
assertEq(totalDscMinted, expectedTotalDscMinted);
assertEq(AMOUNT_COLLATERAL, expectedDepositAmount);
}

function testDepositCollateral() public depositedCollateral {
uint256 expectedTotalDscMinted = 0;
uint256 expectedDepositAmount = engine.getTokenAmountFromUsd(weth, AMOUNT_COLLATERAL);
uint256 expectedCollateralValueInUsd = engine.getUsdValue(weth, AMOUNT_COLLATERAL);

(uint256 totalDscMinted, uint256 collateralVauleInUsd) = engine.getAccountInformation(USER);
assertEq(totalDscMinted, expectedTotalDscMinted);
assertEq(AMOUNT_COLLATERAL, expectedDepositAmount);
assertEq(collateralVauleInUsd, expectedCollateralValueInUsd);
}
}

0 comments on commit 619129f

Please sign in to comment.