Update how constants is used.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
const { BN, constants, shouldFail } = require('openzeppelin-test-helpers');
|
||||
const { ZERO_ADDRESS } = constants;
|
||||
|
||||
const ERC20Mock = artifacts.require('ERC20Mock');
|
||||
const ERC20Mintable = artifacts.require('ERC20Mintable');
|
||||
@ -8,7 +9,7 @@ contract('ERC20Migrator', function ([_, owner, recipient, anotherAccount]) {
|
||||
const totalSupply = new BN('200');
|
||||
|
||||
it('reverts with a null legacy token address', async function () {
|
||||
await shouldFail.reverting(ERC20Migrator.new(constants.ZERO_ADDRESS));
|
||||
await shouldFail.reverting(ERC20Migrator.new(ZERO_ADDRESS));
|
||||
});
|
||||
|
||||
describe('with tokens and migrator', function () {
|
||||
@ -24,7 +25,7 @@ contract('ERC20Migrator', function ([_, owner, recipient, anotherAccount]) {
|
||||
|
||||
describe('beginMigration', function () {
|
||||
it('reverts with a null new token address', async function () {
|
||||
await shouldFail.reverting(this.migrator.beginMigration(constants.ZERO_ADDRESS));
|
||||
await shouldFail.reverting(this.migrator.beginMigration(ZERO_ADDRESS));
|
||||
});
|
||||
|
||||
it('reverts if not a minter of the token', async function () {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
const { BN, constants, expectEvent, shouldFail, time } = require('openzeppelin-test-helpers');
|
||||
const { ZERO_ADDRESS } = constants;
|
||||
|
||||
const ERC20Mintable = artifacts.require('ERC20Mintable');
|
||||
const TokenVesting = artifacts.require('TokenVesting');
|
||||
@ -26,7 +27,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
|
||||
|
||||
it('reverts with a null beneficiary', async function () {
|
||||
await shouldFail.reverting(
|
||||
TokenVesting.new(constants.ZERO_ADDRESS, this.start, this.cliffDuration, this.duration, true, { from: owner })
|
||||
TokenVesting.new(ZERO_ADDRESS, this.start, this.cliffDuration, this.duration, true, { from: owner })
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user