Skip to content

Commit d026ae5

Browse files
committed
Add unit test
1 parent b2071b8 commit d026ae5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/unit/core/BasicUnitTest.t.sol

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,14 @@ contract BasicUnitTest is Utils, Test {
203203
vm.expectRevert();
204204
basic.sellToPool(IERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE), bps, POOL, offset, data);
205205
}
206+
207+
function testBasicTransferFrom() public {
208+
uint256 bps = 10_000; // doesn't matter
209+
uint256 offset = 0; // doesn't matter
210+
bytes memory data =
211+
bytes.concat(IERC20.transferFrom.selector, abi.encode(address(0xdead), address(0xbeef)), bytes1(0x00));
212+
213+
vm.expectRevert(abi.encodeWithSignature("ConfusedDeputy()"));
214+
basic.sellToPool(IERC20(address(0xc offeebabe)), bps, POOL, offset, data);
215+
}
206216
}

0 commit comments

Comments
 (0)