Skip to content

Commit

Permalink
test: queryMessageHashes
Browse files Browse the repository at this point in the history
  • Loading branch information
neutiyoo committed May 16, 2024
1 parent e2db3d2 commit b9c53af
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions contracts/test/MachServiceManager.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -515,4 +515,17 @@ contract MachServiceManagerTest is BLSAVSDeployer {
vm.expectRevert("Ownable: caller is not the owner");
serviceManager.removeAlert("foo");
}

function test_QueryMessageHashes() public {
test_confirmAlert();
bytes32[] memory results = serviceManager.queryMessageHashes(0, 2);
assertTrue(results.length == 1);
assertTrue(results[0] == "foo");
}

function test_QueryMessageHashes_RevertIfInvalidStartIndex() public {
test_confirmAlert();
vm.expectRevert(InvalidStartIndex.selector);
bytes32[] memory results = serviceManager.queryMessageHashes(1, 2);
}
}

0 comments on commit b9c53af

Please sign in to comment.