Update test-helpers to v0.4.0. (#1770)

This commit is contained in:
Nicolás Venturo
2019-05-24 13:36:15 -03:00
committed by GitHub
parent 602d9d9884
commit a71c3bce32
53 changed files with 365 additions and 358 deletions

View File

@ -1,4 +1,4 @@
const { ether, shouldFail } = require('openzeppelin-test-helpers');
const { ether, expectRevert } = require('openzeppelin-test-helpers');
const { shouldBehaveLikeEscrow } = require('./Escrow.behavior');
const ConditionalEscrowMock = artifacts.require('ConditionalEscrowMock');
@ -26,7 +26,7 @@ contract('ConditionalEscrow', function ([_, owner, payee, ...otherAccounts]) {
it('reverts on withdrawals', async function () {
await this.escrow.deposit(payee, { from: owner, value: amount });
await shouldFail.reverting.withMessage(this.escrow.withdraw(payee, { from: owner }),
await expectRevert(this.escrow.withdraw(payee, { from: owner }),
'ConditionalEscrow: payee is not allowed to withdraw'
);
});