diff --git a/contracts/tests/HatsGatekeeper.test.ts b/contracts/tests/HatsGatekeeper.test.ts index 049f188981..0c55ac260a 100644 --- a/contracts/tests/HatsGatekeeper.test.ts +++ b/contracts/tests/HatsGatekeeper.test.ts @@ -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", ); }); }); @@ -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"); }); });