mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 15:38:59 +00:00
fix preen user history test
This commit is contained in:
parent
f675198eb8
commit
97606ddbb0
1 changed files with 7 additions and 4 deletions
|
|
@ -270,10 +270,13 @@ describe 'Cron', ->
|
||||||
after.history = {exp: _.cloneDeep(history), todos: _.cloneDeep(history)}
|
after.history = {exp: _.cloneDeep(history), todos: _.cloneDeep(history)}
|
||||||
after.habits[0].history = _.cloneDeep(history)
|
after.habits[0].history = _.cloneDeep(history)
|
||||||
algos.cron(after)
|
algos.cron(after)
|
||||||
# console.log after.habits[0].history
|
|
||||||
# _.each [after.history.exp, after.history.todos, after.habits[0].history], (arr) ->
|
# remove history entries created by cron
|
||||||
# expect(arr.length).to.be 15
|
after.history.exp.pop()
|
||||||
# expect(arr).to.eql [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
|
after.history.todos.pop()
|
||||||
|
|
||||||
|
_.each [after.history.exp, after.history.todos, after.habits[0].history], (arr) ->
|
||||||
|
expect(_.map(arr, (x)->x.value)).to.eql [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
|
||||||
|
|
||||||
describe 'Todos', ->
|
describe 'Todos', ->
|
||||||
it '1 day missed', ->
|
it '1 day missed', ->
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue