Skip to content

Commit

Permalink
added another test for setter
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsanant committed Aug 7, 2023
1 parent 69c4d99 commit f58e90d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/test/unit/BLSRegistryCoordinatorWithIndicesUnit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ contract BLSRegistryCoordinatorWithIndicesUnit is MockAVSDeployer {
}

function testSetChurnApprover_NotServiceManagerOwner_Reverts() public {
address newChurnApprover = address(uint160(uint256(keccak256("newChurnApprover"))));
cheats.expectRevert("BLSRegistryCoordinatorWithIndices.onlyServiceManagerOwner: caller is not the service manager owner");
cheats.prank(defaultOperator);
registryCoordinator.setChurnApprover(newChurnApprover);
}

function testSetChurnApprover_Valid() public {
address newChurnApprover = address(uint160(uint256(keccak256("newChurnApprover"))));
cheats.prank(serviceManagerOwner);
cheats.expectEmit(true, true, true, true, address(registryCoordinator));
Expand Down

0 comments on commit f58e90d

Please sign in to comment.