From 1d890230a207bb20e4271f0614b9f0af99bdd7f3 Mon Sep 17 00:00:00 2001 From: yehoudaB Date: Mon, 25 Sep 2023 02:39:13 +0200 Subject: [PATCH] fix comment on DSCEngineTest.t.sol (#44) * fix comment ( where do the 200 come from?) * fixing comment in DSCEngineTest.t.sol --- test/unit/DSCEngineTest.t.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/DSCEngineTest.t.sol b/test/unit/DSCEngineTest.t.sol index c3acc62..7e5d550 100644 --- a/test/unit/DSCEngineTest.t.sol +++ b/test/unit/DSCEngineTest.t.sol @@ -378,12 +378,12 @@ contract DSCEngineTest is StdCheats, Test { function testHealthFactorCanGoBelowOne() public depositedCollateralAndMintedDsc { int256 ethUsdUpdatedPrice = 18e8; // 1 ETH = $18 - // Rememeber, we need $150 at all times if we have $100 of debt + // Rememeber, we need $200 at all times if we have $100 of debt MockV3Aggregator(ethUsdPriceFeed).updateAnswer(ethUsdUpdatedPrice); uint256 userHealthFactor = dsce.getHealthFactor(user); - // $180 collateral / 200 debt = 0.9 + // 180*50 (LIQUIDATION_THRESHOLD) / 100 (LIQUIDATION_PRECISION) / 100 (PRECISION) = 90 / 100 (totalDscMinted) = 0.9 assert(userHealthFactor == 0.9 ether); }