fix(tests): add in freeRebirth

This commit is contained in:
deilann 2014-06-22 14:10:25 -07:00
parent 931525df0b
commit 996e7b243b

View file

@ -392,6 +392,10 @@ describe 'Cron', ->
expect(user.lastCron).to.not.be.ok # it setup the cron property now
user.lastCron = +moment().subtract('days',1)
# this is hacky but should fix things for the moment
user.flags.freeRebirth = true
paths = {};user.fns.cron {paths}
expect(user.lastCron).to.be.greaterThan 0
@ -500,9 +504,6 @@ describe 'Cron', ->
and so on - testing each possible outcome along the way
###
# this is hacky but should fix things for the moment
user.flags.freeRebirth = true
runCron = (options) ->
_.each [480, 240, 0, -120], (timezoneOffset) -> # test different timezones
now = shared.startOfWeek({timezoneOffset}).add('hours', options.currentHour||0)