All tests now use account names, and dont use accounts[0] (except ERC… (#1137)

* All tests now use account names, and dont use accounts[0] (except ERC721)

* Added account names to some missing contracts.
This commit is contained in:
Nicolás Venturo
2018-08-02 16:55:31 -03:00
committed by GitHub
parent f49721576f
commit 4544df47da
41 changed files with 210 additions and 300 deletions

View File

@ -11,7 +11,7 @@ require('chai')
const RefundEscrow = artifacts.require('RefundEscrow');
contract('RefundEscrow', function ([owner, beneficiary, refundee1, refundee2]) {
contract('RefundEscrow', function ([_, owner, beneficiary, refundee1, refundee2]) {
const amount = web3.toWei(54.0, 'ether');
const refundees = [refundee1, refundee2];
@ -92,7 +92,7 @@ contract('RefundEscrow', function ([owner, beneficiary, refundee1, refundee2]) {
it('refunds refundees', async function () {
for (const refundee of [refundee1, refundee2]) {
const refundeeInitialBalance = await ethGetBalance(refundee);
await this.escrow.withdraw(refundee);
await this.escrow.withdraw(refundee, { from: owner });
const refundeeFinalBalance = await ethGetBalance(refundee);
refundeeFinalBalance.sub(refundeeInitialBalance).should.be.bignumber.equal(amount);