Skip to content

Commit

Permalink
fix: tests for hats gatekeeper and ownable
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmad committed Apr 17, 2024
1 parent 188b259 commit 9653154
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions contracts/tests/HatsGatekeeper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ describe("HatsProtocol Gatekeeper", () => {
});

it("should fail to set MACI instance when the caller is not the owner", async () => {
await expect(hatsGatekeeperSingle.connect(voter).setMaciInstance(signerAddress)).to.be.revertedWith(
"Ownable: caller is not the owner",
await expect(hatsGatekeeperSingle.connect(voter).setMaciInstance(signerAddress)).to.be.revertedWithCustomError(
hatsGatekeeperSingle,
"OwnableUnauthorizedAccount",
);
});
});
Expand Down Expand Up @@ -252,9 +253,9 @@ describe("HatsProtocol Gatekeeper", () => {
});

it("should fail to set MACI instance when the caller is not the owner", async () => {
await expect(hatsGatekeeperMultiple.connect(voter).setMaciInstance(signerAddress)).to.be.revertedWith(
"Ownable: caller is not the owner",
);
await expect(
hatsGatekeeperMultiple.connect(voter).setMaciInstance(signerAddress),
).to.be.revertedWithCustomError(hatsGatekeeperMultiple, "OwnableUnauthorizedAccount");
});
});

Expand Down

0 comments on commit 9653154

Please sign in to comment.