Skip to content

Commit

Permalink
test: can revoke tokens immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyrharper committed Dec 2, 2023
1 parent 33bd1e9 commit 780a9dd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/TokenVesting.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe.only("TokenVesting", function () {
before(async function () {
this.signers = await ethers.getSigners()
this.alice = this.signers[0]
this.rando = this.signers[1]

this.JoeToken = await ethers.getContractFactory("JoeToken")
this.TokenVesting = await ethers.getContractFactory("TokenVesting")
Expand Down Expand Up @@ -42,6 +43,13 @@ describe.only("TokenVesting", function () {
expect(await this.joe.balanceOf(this.tokenVesting.address)).to.equal(0)
})

it("can revoke tokens immediately", async function() {
await this.tokenVesting.revoke(this.joe.address);
await increase(duration.days(14));
await expect(this.tokenVesting.release(this.joe.address)).to.be.revertedWith("TokenVesting: no tokens are due")

});

after(async function () {
await network.provider.request({
method: "hardhat_reset",
Expand Down

0 comments on commit 780a9dd

Please sign in to comment.