Skip to content

Commit

Permalink
✅ test_payDebtWithUSDC_Unauthorized
Browse files Browse the repository at this point in the history
  • Loading branch information
cmontecoding committed Dec 16, 2024
1 parent a48e008 commit 0041c5d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/PayDebt.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ contract PayDebtTest is Bootstrap {
engine.payDebt({_accountId: ACCOUNT_ID, _amount: INITIAL_DEBT});
}

function test_payDebtWithUSDC_Unauthorized() public {
vm.startPrank(ACTOR);

sUSD.approve(address(engine), INITIAL_DEBT);

vm.expectRevert(abi.encodeWithSelector(IEngine.Unauthorized.selector));

engine.payDebtWithUSDC({_accountId: ACCOUNT_ID, _amount: INITIAL_DEBT, _zapMinAmountOut: 1});
}

/// @custom:todo Get a debt position on Base to fork
// function test_payDebt() public {
// /// @dev on this block (266_832_048), ACCOUNT_ID has a debt value of INITIAL_DEBT
Expand Down

0 comments on commit 0041c5d

Please sign in to comment.