Skip to content

Commit

Permalink
adjust test for new errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SamBorisov committed Apr 25, 2024
1 parent 27b9418 commit 7abdec4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/ValidatorSet/ValidatorSet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ describe("ValidatorSet", function () {
validatorSet
.connect(this.signers.governance)
.addToWhitelist([this.signers.validators[0].address, this.signers.validators[1].address])
).to.be.revertedWith("Previously whitelisted.");
).to.be.revertedWithCustomError(validatorSet, "PreviouslyWhitelisted");
});

it("should be able to remove from whitelist", async function () {
Expand Down Expand Up @@ -410,7 +410,7 @@ describe("ValidatorSet", function () {

await expect(
validatorSet.connect(this.signers.governance).removeFromWhitelist([this.signers.validators[3].address])
).to.be.revertedWith("Must be whitelisted.");
).to.be.revertedWithCustomError(validatorSet, "MustBeWhitelisted");

expect((await validatorSet.validators(this.signers.validators[3].address)).status).to.be.equal(
VALIDATOR_STATUS.None
Expand All @@ -428,7 +428,7 @@ describe("ValidatorSet", function () {
validatorSet
.connect(this.signers.governance)
.addToWhitelist([this.signers.validators[0].address, this.signers.validators[1].address])
).to.be.revertedWith("Previously whitelisted.");
).to.be.revertedWithCustomError(validatorSet, "PreviouslyWhitelisted");
});
});

Expand Down

0 comments on commit 7abdec4

Please sign in to comment.