diff --git a/test/position-managers/PositionManager.notifier.t.sol b/test/position-managers/PositionManager.notifier.t.sol index b69d0a86..79fcb3be 100644 --- a/test/position-managers/PositionManager.notifier.t.sol +++ b/test/position-managers/PositionManager.notifier.t.sol @@ -492,6 +492,20 @@ contract PositionManagerNotifierTest is Test, PosmTestSetup { lpm.unsubscribe(tokenId); } + function test_subscribe_revertsOnEOA() public { + uint256 tokenId = lpm.nextTokenId(); + address subEOA = makeAddr("SUBSCRIBER"); + mint(config, 100e18, alice, ZERO_BYTES); + + // approve this contract to operate on alices liq + vm.startPrank(alice); + lpm.approve(address(this), tokenId); + vm.stopPrank(); + + vm.expectRevert(); + lpm.subscribe(tokenId, subEOA, ZERO_BYTES); + } + function test_subscribe_withData() public { uint256 tokenId = lpm.nextTokenId(); mint(config, 100e18, alice, ZERO_BYTES);