Skip to content

Commit

Permalink
Merge pull request #649 from morpho-org/fix/test
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisGD authored Dec 18, 2023
2 parents 64dac54 + 54d8af2 commit b48b0cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 293 deletions.
8 changes: 4 additions & 4 deletions test/forge/BaseTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,19 @@ contract BaseTest is Test {
loanToken.approve(address(morpho), type(uint256).max);
collateralToken.approve(address(morpho), type(uint256).max);

changePrank(BORROWER);
vm.startPrank(BORROWER);
loanToken.approve(address(morpho), type(uint256).max);
collateralToken.approve(address(morpho), type(uint256).max);

changePrank(REPAYER);
vm.startPrank(REPAYER);
loanToken.approve(address(morpho), type(uint256).max);
collateralToken.approve(address(morpho), type(uint256).max);

changePrank(LIQUIDATOR);
vm.startPrank(LIQUIDATOR);
loanToken.approve(address(morpho), type(uint256).max);
collateralToken.approve(address(morpho), type(uint256).max);

changePrank(ONBEHALF);
vm.startPrank(ONBEHALF);
loanToken.approve(address(morpho), type(uint256).max);
collateralToken.approve(address(morpho), type(uint256).max);
morpho.setAuthorization(BORROWER, true);
Expand Down
2 changes: 1 addition & 1 deletion test/forge/integration/BorrowIntegrationTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ contract BorrowIntegrationTest is BaseTest {
collateralToken.approve(address(morpho), amountCollateral);
morpho.supplyCollateral(marketParams, amountCollateral, supplier, hex"");

changePrank(attacker);
vm.startPrank(attacker);
vm.expectRevert(bytes(ErrorsLib.UNAUTHORIZED));
morpho.borrow(marketParams, amountBorrowed, 0, supplier, RECEIVER);
}
Expand Down
Loading

0 comments on commit b48b0cf

Please sign in to comment.