Skip to content

Commit 52bdea6

Browse files
committed
Fix expectRevert targets KeyperSet.t.sol
1 parent e429fe4 commit 52bdea6

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

test/KeyperSet.t.sol

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,34 @@ contract KeyperSetTest is Test {
7575

7676
function testAddMembersOnlyOwner() public {
7777
address[] memory members = new address[](0);
78-
vm.expectRevert("Ownable: caller is not the owner");
78+
vm.expectRevert(
79+
abi.encodeWithSelector(
80+
Ownable.OwnableUnauthorizedAccount.selector,
81+
address(1)
82+
)
83+
);
7984
vm.prank(address(1));
8085
keyperSet.addMembers(members);
8186
}
8287

8388
function testSetThresholdOnlyOwner() public {
84-
vm.expectRevert("Ownable: caller is not the owner");
89+
vm.expectRevert(
90+
abi.encodeWithSelector(
91+
Ownable.OwnableUnauthorizedAccount.selector,
92+
address(1)
93+
)
94+
);
8595
vm.prank(address(1));
8696
keyperSet.setThreshold(0);
8797
}
8898

8999
function testSetKeybroadcasterOnlyOwner() public {
90-
vm.expectRevert("Ownable: caller is not the owner");
100+
vm.expectRevert(
101+
abi.encodeWithSelector(
102+
Ownable.OwnableUnauthorizedAccount.selector,
103+
address(1)
104+
)
105+
);
91106
vm.prank(address(1));
92107
keyperSet.setPublisher(address(5));
93108
}
@@ -99,7 +114,12 @@ contract KeyperSetTest is Test {
99114
}
100115

101116
function testSetFinalizedOnlyOwner() public {
102-
vm.expectRevert("Ownable: caller is not the owner");
117+
vm.expectRevert(
118+
abi.encodeWithSelector(
119+
Ownable.OwnableUnauthorizedAccount.selector,
120+
address(1)
121+
)
122+
);
103123
vm.prank(address(1));
104124
keyperSet.setFinalized();
105125
}

0 commit comments

Comments
 (0)