Skip to content

Commit

Permalink
fix: Fix tests after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
bingen committed May 7, 2024
1 parent fbbf1af commit a3dcef7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions contracts/src/test/borrowerOperations.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ contract BorrowerOperationsTest is DevTestSetup {
}

function testRepayingTooMuchDebtReverts() public {
uint256 troveId = openTroveNoHints100pctMaxFee(A, 100 ether, 2_000 ether, 0.01 ether);
uint256 troveId = openTroveNoHints100pct(A, 100 ether, 2_000 ether, 0.01 ether);
deal(address(boldToken), A, 1_000 ether);
vm.prank(A);
vm.expectRevert("BorrowerOps: Amount repaid must not be larger than the Trove's debt");
borrowerOperations.repayBold(troveId, 3_000 ether);
}

function testWithdrawingTooMuchCollateralReverts() public {
uint256 troveId = openTroveNoHints100pctMaxFee(A, 100 ether, 2_000 ether, 0.01 ether);
uint256 troveId = openTroveNoHints100pct(A, 100 ether, 2_000 ether, 0.01 ether);
vm.prank(A);
vm.expectRevert("BorrowerOps: Can't withdraw more than the Trove's entire collateral");
borrowerOperations.withdrawColl(troveId, 200 ether);
Expand Down
8 changes: 4 additions & 4 deletions contracts/src/test/troveManager.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ contract TroveManagerTest is DevTestSetup {
uint256 coll = 100 ether;
uint256 borrow = 10_000 ether;
uint256 interestRate = 0.01 ether;
troveIDs.A = openTroveNoHints100pctMaxFee(A, coll, borrow, interestRate);
troveIDs.B = openTroveNoHints100pctMaxFee(B, coll, borrow, interestRate);
troveIDs.C = openTroveNoHints100pctMaxFee(C, coll, borrow, interestRate);
troveIDs.D = openTroveNoHints100pctMaxFee(D, 1_000 ether, borrow, interestRate); // whale to keep TCR afloat
troveIDs.A = openTroveNoHints100pct(A, coll, borrow, interestRate);
troveIDs.B = openTroveNoHints100pct(B, coll, borrow, interestRate);
troveIDs.C = openTroveNoHints100pct(C, coll, borrow, interestRate);
troveIDs.D = openTroveNoHints100pct(D, 1_000 ether, borrow, interestRate); // whale to keep TCR afloat

uint256 dropPrice = 110 ether;
priceFeed.setPrice(dropPrice);
Expand Down

0 comments on commit a3dcef7

Please sign in to comment.