Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed May 9, 2024
1 parent 5f3cef7 commit 0e49e38
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/vesting/VestingWallet.recovery.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,23 @@ describe('VestingWallet ', function () {
unsafeAllow: 'delegatecall',
});

// restricted
await expect(this.vesting.connect(this.accounts.other).updateBeneficiary(this.accounts.other.address))
.to.be.revertedWith(`Ownable: caller is not the owner`);

// authorized
await expect(this.vesting.connect(this.accounts.admin).updateBeneficiary(this.accounts.user2.address))
.to.emit(this.vesting, 'BeneficiaryUpdate').withArgs(this.accounts.user2.address);

expect(await this.vesting.beneficiary()).to.be.equal(this.accounts.user2.address);
await Promise.all([this.vesting.start(), this.vesting.cliff(), this.vesting.duration(), this.vesting.beneficiary(), this.vesting.owner()]).then(
([start, cliff, duration, beneficiary, owner]) => {
expect(start).to.be.equal(allocation.start);
expect(cliff).to.be.equal(allocation.cliff);
expect(duration).to.be.equal(allocation.duration);
expect(beneficiary).to.be.equal(this.accounts.user2.address);
expect(owner).to.be.equal(allocation.owner);
}
);
});
});
});
Expand Down

0 comments on commit 0e49e38

Please sign in to comment.