From f84278433d8fff5a0b45896358b83d6f84c60a8e Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Fri, 18 Jan 2019 17:52:23 -0300 Subject: [PATCH] fix old helpers --- test/ownership/Ownable.test.js | 7 ++++--- test/token/ERC20/StandaloneERC20.test.js | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/ownership/Ownable.test.js b/test/ownership/Ownable.test.js index 7f345ca53..7139f6cc0 100644 --- a/test/ownership/Ownable.test.js +++ b/test/ownership/Ownable.test.js @@ -1,5 +1,6 @@ -const { EVMRevert } = require('../helpers/EVMRevert'); -const { expectThrow } = require('../helpers/expectThrow'); +const { shouldFail } = require('../helpers/shouldFail'); + +require('../helpers/setup'); const { shouldBehaveLikeOwnable } = require('./Ownable.behavior'); @@ -11,7 +12,7 @@ contract('Ownable', function ([_, owner, anyone, ...otherAccounts]) { }); it('cannot be reinitialized', async function () { - await expectThrow(this.ownable.initialize(anyone), EVMRevert); + await shouldFail.reverting(this.ownable.initialize(anyone)); }); shouldBehaveLikeOwnable(owner, otherAccounts); diff --git a/test/token/ERC20/StandaloneERC20.test.js b/test/token/ERC20/StandaloneERC20.test.js index 9041094a1..dd75c4e98 100644 --- a/test/token/ERC20/StandaloneERC20.test.js +++ b/test/token/ERC20/StandaloneERC20.test.js @@ -1,6 +1,6 @@ const encodeCall = require('zos-lib/lib/helpers/encodeCall').default; const { shouldBehaveLikeERC20Mintable } = require('./behaviors/ERC20Mintable.behavior'); -const { assertRevert } = require('../../helpers/assertRevert'); +const { shouldFail } = require('../../helpers/shouldFail'); const BigNumber = web3.BigNumber; @@ -44,7 +44,7 @@ contract('StandaloneERC20', function ([ describe('with all arguments', function () { it('reverts if initial balance is zero', async function () { - await assertRevert( + await shouldFail.reverting( initializeFull(this.token, name, symbol, decimals, 0, ZERO_ADDRESS, minters, pausers, deployer) ); });