No longer assigning awaits to temporary variables. (#1216)

This commit is contained in:
Nicolás Venturo
2018-08-17 16:10:40 -03:00
committed by GitHub
parent df9426f989
commit 20cf885430
43 changed files with 231 additions and 467 deletions

View File

@ -45,23 +45,20 @@ contract('TokenTimelock', function ([_, owner, beneficiary]) {
it('can be released just after limit', async function () {
await increaseTimeTo(this.releaseTime + duration.seconds(1));
await this.timelock.release();
const balance = await this.token.balanceOf(beneficiary);
balance.should.be.bignumber.equal(amount);
(await this.token.balanceOf(beneficiary)).should.be.bignumber.equal(amount);
});
it('can be released after time limit', async function () {
await increaseTimeTo(this.releaseTime + duration.years(1));
await this.timelock.release();
const balance = await this.token.balanceOf(beneficiary);
balance.should.be.bignumber.equal(amount);
(await this.token.balanceOf(beneficiary)).should.be.bignumber.equal(amount);
});
it('cannot be released twice', async function () {
await increaseTimeTo(this.releaseTime + duration.years(1));
await this.timelock.release();
await expectThrow(this.timelock.release());
const balance = await this.token.balanceOf(beneficiary);
balance.should.be.bignumber.equal(amount);
(await this.token.balanceOf(beneficiary)).should.be.bignumber.equal(amount);
});
});
});