Fix invalid number of args for solidity function errors in tests
This commit is contained in:
@ -45,7 +45,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) {
|
|||||||
|
|
||||||
it('should reject payments before start', async function () {
|
it('should reject payments before start', async function () {
|
||||||
await this.crowdsale.send(value).should.be.rejectedWith(EVMThrow)
|
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 () {
|
it('should accept payments after start', async function () {
|
||||||
|
|||||||
@ -13,7 +13,7 @@ contract('DayLimit', function(accounts) {
|
|||||||
beforeEach( async function() {
|
beforeEach( async function() {
|
||||||
dayLimit = await DayLimitMock.new(initLimit);
|
dayLimit = await DayLimitMock.new(initLimit);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should construct with the passed daily limit', async function() {
|
it('should construct with the passed daily limit', async function() {
|
||||||
let dailyLimit = await dayLimit.dailyLimit();
|
let dailyLimit = await dayLimit.dailyLimit();
|
||||||
assert.equal(initLimit, dailyLimit);
|
assert.equal(initLimit, dailyLimit);
|
||||||
@ -76,7 +76,7 @@ contract('DayLimit', function(accounts) {
|
|||||||
spentToday = await dayLimit.spentToday();
|
spentToday = await dayLimit.spentToday();
|
||||||
assert.equal(spentToday, 8);
|
assert.equal(spentToday, 8);
|
||||||
|
|
||||||
await dayLimit.resetSpentToday(15);
|
await dayLimit.resetSpentToday();
|
||||||
await dayLimit.attemptSpend(3);
|
await dayLimit.attemptSpend(3);
|
||||||
spentToday = await dayLimit.spentToday();
|
spentToday = await dayLimit.spentToday();
|
||||||
assert.equal(spentToday, 3);
|
assert.equal(spentToday, 3);
|
||||||
|
|||||||
Reference in New Issue
Block a user