mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-20 18:54:13 +00:00
fix(tests): add in freeRebirth
This commit is contained in:
parent
931525df0b
commit
996e7b243b
1 changed files with 4 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue