mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Feature - Store Exact Completion Date For Dailies (#9813)
* dailies history date added in scoreTask instead of cron * fix lint issues * changes based on feedback. Undo cron code deletion and deleted iteration on scoreTask * fix lint issues * add task history entry in cron for dailies that weren't completed * add history entry after value is fully evaluated
This commit is contained in:
committed by
Matteo Pagliazzi
parent
fbacb56700
commit
a61d911c48
@@ -291,11 +291,14 @@ describe('shared.ops.scoreTask', () => {
|
||||
scoreTask({user: ref.afterUser, task: daily, direction: 'up'});
|
||||
expectGainedPoints(ref.beforeUser, ref.afterUser, freshDaily, daily);
|
||||
expect(daily.completed).to.eql(true);
|
||||
expect(daily.history.length).to.eql(1);
|
||||
});
|
||||
|
||||
it('up, down', () => {
|
||||
scoreTask({user: ref.afterUser, task: daily, direction: 'up'});
|
||||
expect(daily.history.length).to.eql(1);
|
||||
scoreTask({user: ref.afterUser, task: daily, direction: 'down'});
|
||||
expect(daily.history.length).to.eql(0);
|
||||
expectClosePoints(ref.beforeUser, ref.afterUser, freshDaily, daily);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user