Skip to content

Commit

Permalink
Add coverage on requestAppeal
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Ng committed Apr 26, 2018
1 parent 9bc7951 commit 63b63db
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/contracts/test/tcr/registryWithAppeals/requestAppeal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ contract("Registry With Appeals", accounts => {
);
});

it("should fail if appeal is already in progress", async () => {
await registry.apply(newsroomAddress, minDeposit, "", { from: applicant });
await registry.challenge(newsroomAddress, "", { from: challenger });
await utils.advanceEvmTime(utils.paramConfig.commitStageLength);
await utils.advanceEvmTime(utils.paramConfig.revealStageLength + 1);
await registry.requestAppeal(newsroomAddress, { from: applicant });
await expect(registry.requestAppeal(newsroomAddress, { from: applicant })).to.eventually.be.rejectedWith(
REVERTED,
"Should not have allowed appeal on appeal in progress",
);
});

it("should succeed if challenge is in after reveal phase", async () => {
await registry.apply(newsroomAddress, minDeposit, "", { from: applicant });
await registry.challenge(newsroomAddress, "", { from: challenger });
Expand Down

0 comments on commit 63b63db

Please sign in to comment.