mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Habits: store one history entry per day (#10442)
* initial refactor * add scoredUp and scoredDown values for habits history entries, one entry per habit per day * fix lint and add initial migration * update old test * remove scoreNotes * dry run for migration * migration fixes * update migration and remove old test * fix * add challenges migration (read only) * fix challenges migration * handle custom day start * update tasks in migration * scoring: support cds * add new test
This commit is contained in:
@@ -254,13 +254,14 @@ describe('shared.ops.scoreTask', () => {
|
||||
expect(ref.afterUser.stats.gp).to.be.greaterThan(ref.beforeUser.stats.gp);
|
||||
});
|
||||
|
||||
it('adds score notes', () => {
|
||||
// not supported anymore
|
||||
it('does not add score notes to task', () => {
|
||||
let scoreNotesString = 'scoreNotes';
|
||||
habit.scoreNotes = scoreNotesString;
|
||||
options = { user: ref.afterUser, task: habit, direction: 'up', times: 5, cron: false };
|
||||
scoreTask(options);
|
||||
|
||||
expect(habit.history[0].scoreNotes).to.eql(scoreNotesString);
|
||||
expect(habit.history[0].scoreNotes).to.eql(undefined);
|
||||
});
|
||||
|
||||
it('down', () => {
|
||||
|
||||
Reference in New Issue
Block a user