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

@ -16,7 +16,7 @@ require('chai')
const SampleCrowdsale = artifacts.require('SampleCrowdsale');
const SampleCrowdsaleToken = artifacts.require('SampleCrowdsaleToken');
contract('SampleCrowdsale', function ([owner, wallet, investor]) {
contract('SampleCrowdsale', function ([_, owner, wallet, investor]) {
const RATE = new BigNumber(10);
const GOAL = ether(10);
const CAP = ether(20);
@ -33,9 +33,10 @@ contract('SampleCrowdsale', function ([owner, wallet, investor]) {
this.token = await SampleCrowdsaleToken.new({ from: owner });
this.crowdsale = await SampleCrowdsale.new(
this.openingTime, this.closingTime, RATE, wallet, CAP, this.token.address, GOAL
this.openingTime, this.closingTime, RATE, wallet, CAP, this.token.address, GOAL,
{ from: owner }
);
await this.token.transferOwnership(this.crowdsale.address);
await this.token.transferOwnership(this.crowdsale.address, { from: owner });
});
it('should create crowdsale with correct parameters', async function () {