Move token creation outside of crowdsale contract (#690)

Fixes #358
This commit is contained in:
Santiago Palladino
2018-01-24 11:44:35 -03:00
committed by Francisco Giordano
parent 0541347034
commit 4d7c3cca75
10 changed files with 39 additions and 34 deletions

View File

@ -29,8 +29,11 @@ contract('SampleCrowdsale', function ([owner, wallet, investor]) {
this.endTime = this.startTime + duration.weeks(1);
this.afterEndTime = this.endTime + duration.seconds(1);
this.crowdsale = await SampleCrowdsale.new(this.startTime, this.endTime, RATE, GOAL, CAP, wallet);
this.token = SampleCrowdsaleToken.at(await this.crowdsale.token());
this.token = await SampleCrowdsaleToken.new();
this.crowdsale = await SampleCrowdsale.new(
this.startTime, this.endTime, RATE, GOAL, CAP, wallet, this.token.address
);
await this.token.transferOwnership(this.crowdsale.address);
});
it('should create crowdsale with correct parameters', async function () {