Skip to content

Commit

Permalink
test(irm): add irm zero test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed Dec 7, 2023
1 parent 15de2e6 commit b66aa91
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/forge/BaseTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ contract BaseTest is Test {
irm = new IrmMock();

vm.startPrank(OWNER);
morpho.enableIrm(address(0));
morpho.enableIrm(address(irm));
morpho.enableLltv(0);
morpho.setFeeRecipient(FEE_RECIPIENT);
vm.stopPrank();

Expand Down
12 changes: 12 additions & 0 deletions test/forge/integration/AccrueInterestIntegrationTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ contract AccrueInterestIntegrationTest is BaseTest {
morpho.accrueInterest(marketParamsFuzz);
}

function testAccrueInterestIrmZero(MarketParams memory marketParamsFuzz, uint256 blocks) public {
marketParamsFuzz.irm = address(0);
marketParamsFuzz.lltv = 0;
blocks = _boundBlocks(blocks);

morpho.createMarket(marketParamsFuzz);

_forward(blocks);

morpho.accrueInterest(marketParamsFuzz);
}

function testAccrueInterestNoTimeElapsed(uint256 amountSupplied, uint256 amountBorrowed) public {
uint256 collateralPrice = oracle.price();
uint256 amountCollateral;
Expand Down

0 comments on commit b66aa91

Please sign in to comment.