Skip to content

Commit

Permalink
Add test for ZoneAlreadyExists
Browse files Browse the repository at this point in the history
  • Loading branch information
BCLeFevre committed Jun 14, 2022
1 parent 7f1cf15 commit 12b7369
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,24 @@ describe(`Consideration (version: ${VERSION}) — initial test suite`, function
await gpDeployer.connect(buyer).pause(zoneAddr);
});

it("Revert on deploying a zone with the same salt", async () => {
const GPDeployer = await ethers.getContractFactory(
"PausableZoneController",
owner
);
const gpDeployer = await GPDeployer.deploy(owner.address);

const salt = randomHex();

// Create zone with salt
await gpDeployer.createZone(salt);

// Create zone with same salt
await expect(gpDeployer.createZone(salt)).to.be.revertedWith(
"ZoneAlreadyExists"
);
});

it("Revert on an order with a pausable zone if zone has been self destructed", async () => {
// deploy GPD
const GPDeployer = await ethers.getContractFactory(
Expand Down

0 comments on commit 12b7369

Please sign in to comment.