Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test/position-managers/PositionManager.notifier.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,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);
IERC721(address(lpm)).approve(address(this), tokenId);
vm.stopPrank();

vm.expectRevert();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to vm.expectRevert(INotifier.NoCodeSubscriber.selector); ?

lpm.subscribe(tokenId, subEOA, ZERO_BYTES);
}

function test_subscribe_withData() public {
uint256 tokenId = lpm.nextTokenId();
mint(config, 100e18, alice, ZERO_BYTES);
Expand Down
Loading