From 6fccd202fe637b9820907ecf0d7824f40b50e398 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Wed, 26 Jul 2017 17:20:28 -0300 Subject: [PATCH] Fix invalid number of args for solidity function errors in tests --- test/Crowdsale.js | 2 +- test/DayLimit.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Crowdsale.js b/test/Crowdsale.js index 3e697b05a..5160fea42 100644 --- a/test/Crowdsale.js +++ b/test/Crowdsale.js @@ -45,7 +45,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) { it('should reject payments before start', async function () { await this.crowdsale.send(value).should.be.rejectedWith(EVMThrow) - await this.crowdsale.buyTokens(investor, value, {from: purchaser}).should.be.rejectedWith(EVMThrow) + await this.crowdsale.buyTokens(investor, {from: purchaser, value: value}).should.be.rejectedWith(EVMThrow) }) it('should accept payments after start', async function () { diff --git a/test/DayLimit.js b/test/DayLimit.js index bad39fdc8..66befb00e 100644 --- a/test/DayLimit.js +++ b/test/DayLimit.js @@ -13,7 +13,7 @@ contract('DayLimit', function(accounts) { beforeEach( async function() { dayLimit = await DayLimitMock.new(initLimit); }); - + it('should construct with the passed daily limit', async function() { let dailyLimit = await dayLimit.dailyLimit(); assert.equal(initLimit, dailyLimit); @@ -76,7 +76,7 @@ contract('DayLimit', function(accounts) { spentToday = await dayLimit.spentToday(); assert.equal(spentToday, 8); - await dayLimit.resetSpentToday(15); + await dayLimit.resetSpentToday(); await dayLimit.attemptSpend(3); spentToday = await dayLimit.spentToday(); assert.equal(spentToday, 3);