Skip to content

Commit

Permalink
add test for installing twice
Browse files Browse the repository at this point in the history
  • Loading branch information
alvrs committed Oct 30, 2023
1 parent bc196ec commit e036de0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/world-modules/test/ERC721.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,22 @@ contract ERC721Test is Test, GasReporter, IERC721Events, IERC721Errors {
assertEq(NamespaceOwner.get(WorldResourceIdLib.encodeNamespace("myERC721")), address(this));
}

function testInstallTwice() public {
// Install the ERC721 module again
IERC721Mintable anotherToken = registerERC721(
world,
"anotherERC721",
ERC721MetadataData({ name: "Token", symbol: "TKN", baseURI: "" })
);
assertTrue(address(anotherToken) != address(0));
assertTrue(address(anotherToken) != address(token));
}

/////////////////////////////////////////////////
// SOLADY ERC721 TEST CAES
// (https://github.com/Vectorized/solady/blob/main/test/ERC721.t.sol)
/////////////////////////////////////////////////

function testMint(uint256 id, address owner) public {
vm.assume(owner != address(0));

Expand Down

0 comments on commit e036de0

Please sign in to comment.