Skip to content

Commit

Permalink
fix: improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Jul 17, 2024
1 parent 18a99a3 commit 64b3be8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/UpgradableOwnableWithGuardian.t copy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ contract TestOfUpgradableOwnableWithGuardian is Test {
withGuardian.updateGuardian(newGuardian);
}

function test_updateGuardian_eoa(address newGuardian) external {
vm.assume(newGuardian != owner && newGuardian != guardian);
function test_updateGuardian_eoa(address eoa, address newGuardian) external {
vm.assume(eoa != owner && eoa != guardian);

vm.prank(eoa);
vm.expectRevert(
abi.encodeWithSelector(
UpgradableOwnableWithGuardian.OnlyGuardianOrOwnerInvalidCaller.selector,
address(this)
eoa
)
);
withGuardian.updateGuardian(newGuardian);
Expand Down

0 comments on commit 64b3be8

Please sign in to comment.