remove timer

This commit is contained in:
Manuel Araoz
2017-11-12 15:10:46 -05:00
parent c4ca7f03e3
commit 7dd0ee6212
2 changed files with 4 additions and 31 deletions

View File

@ -1,6 +1,7 @@
'use strict';
const assertJump = require('./helpers/assertJump');
const timer = require('./helpers/timer');
import latestTime from './helpers/latestTime'
import {increaseTimeTo, duration} from './helpers/increaseTime'
var DayLimitMock = artifacts.require('./helpers/DayLimitMock.sol');
@ -11,6 +12,7 @@ contract('DayLimit', function(accounts) {
let initLimit = 10;
beforeEach( async function() {
this.startTime = latestTime();
dayLimit = await DayLimitMock.new(initLimit);
});
@ -99,7 +101,7 @@ contract('DayLimit', function(accounts) {
spentToday = await dayLimit.spentToday();
assert.equal(spentToday, 8);
await timer(day);
await increaseTimeTo(this.startTime + duration.days(1));
await dayLimit.attemptSpend(3);
spentToday = await dayLimit.spentToday();