Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanio committed Apr 6, 2024
1 parent 43bc829 commit 0983ce3
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions test/ERC721ContractMetadata.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,11 @@ describe(`ERC721ContractMetadata (v${VERSION})`, function () {
});

it("Should not let the owner set the max supply over the totalMinted", async () => {
await token.setMaxSupply(3);
await whileImpersonating(
seadrop.address,
provider,
async (impersonatedSigner) => {
await token.connect(impersonatedSigner).mintSeaDrop(owner.address, 3);
}
);
expect(await token.totalSupply()).to.equal(3);
expect(await token.maxSupply()).to.equal(25);
expect(await token.totalSupply()).to.equal(2);

await expect(token.setMaxSupply(2)).to.be.revertedWith(
"NewMaxSupplyCannotBeLessThenTotalMinted(2, 3)"
await expect(token.setMaxSupply(1)).to.be.revertedWith(
"NewMaxSupplyCannotBeLessThenTotalMinted(1, 2)"
);
});

Expand Down

0 comments on commit 0983ce3

Please sign in to comment.