Update how constants is used.

This commit is contained in:
Nicolás Venturo
2019-01-11 16:30:52 -03:00
parent 53767a0963
commit 8c5d65de2f
19 changed files with 69 additions and 51 deletions

View File

@ -1,4 +1,5 @@
const { balance, constants, ether, expectEvent, send, shouldFail } = require('openzeppelin-test-helpers');
const { ZERO_ADDRESS } = constants;
const PaymentSplitter = artifacts.require('PaymentSplitter');
@ -18,7 +19,7 @@ contract('PaymentSplitter', function ([_, owner, payee1, payee2, payee3, nonpaye
});
it('rejects null payees', async function () {
await shouldFail.reverting(PaymentSplitter.new([payee1, constants.ZERO_ADDRESS], [20, 30]));
await shouldFail.reverting(PaymentSplitter.new([payee1, ZERO_ADDRESS], [20, 30]));
});
it('rejects zero-valued shares', async function () {

View File

@ -1,4 +1,5 @@
const { balance, constants, ether, expectEvent, shouldFail } = require('openzeppelin-test-helpers');
const { ZERO_ADDRESS } = constants;
const RefundEscrow = artifacts.require('RefundEscrow');
@ -8,7 +9,7 @@ contract('RefundEscrow', function ([_, primary, beneficiary, refundee1, refundee
it('requires a non-null beneficiary', async function () {
await shouldFail.reverting(
RefundEscrow.new(constants.ZERO_ADDRESS, { from: primary })
RefundEscrow.new(ZERO_ADDRESS, { from: primary })
);
});