Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Builddddder committed Oct 23, 2023
1 parent 6274b72 commit 62937f4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions contracts/test/example/ERC1271Module.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ contract ERC1271ModuleTest is Test {
erc1271Module.run(attestationPayload, signature, signerAddress, 0);
}

function test_ERC1271Module_WrongSender() public {
address user = makeAddr("NotASigner");
AttestationPayload memory attestationPayload = AttestationPayload(
bytes32(uint256(1234)),
0,
bytes("subject"),
new bytes(1)
);

vm.expectRevert(ERC1271Module.WrongSender.selector);
erc1271Module.run(attestationPayload, bytes("0"), user, 0);
}

function test_EcRecoverModule_supportsInterface() public {
bool isAbstractModuleSupported = erc1271Module.supportsInterface(type(AbstractModule).interfaceId);
assertEq(isAbstractModuleSupported, true);
Expand Down

0 comments on commit 62937f4

Please sign in to comment.