Skip to content

Commit

Permalink
add exists() test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sisyphusSmiling committed Feb 12, 2025
1 parent eb95df0 commit 0ffd27c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions solidity/test/CrossVMBridgeERC721Fulfillment.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ contract CrossVMBridgeERC721FulfillmentTest is Test {
}

function test_FulfillToEVMMintSucceeds() public {
bool exists = erc721Impl.exists(fulfilledId);
assertFalse(exists);

// Ensure fulfilledId is nonexistent
vm.expectRevert(
abi.encodeWithSelector(IERC721Errors.ERC721NonexistentToken.selector, fulfilledId)
Expand All @@ -68,7 +71,9 @@ contract CrossVMBridgeERC721FulfillmentTest is Test {

// Confirm id was fulfilled to recipient
address ownerOf = erc721Impl.ownerOf(fulfilledId);
exists = erc721Impl.exists(fulfilledId);
assertEq(recipient, ownerOf);
assertTrue(exists);

// Confirm overridden before & after hooks executed
uint256 postFulfillmentBeforeCounter = erc721Impl.beforeCounter();
Expand Down

0 comments on commit 0ffd27c

Please sign in to comment.