mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
round priority on update too (#10186)
* round priority on update too * move the fix to Task sanitizeTransform * refactor the task.priority parsing
This commit is contained in:
@@ -296,6 +296,16 @@ describe('PUT /tasks/:id', () => {
|
||||
|
||||
expect(fetchedDaily.text).to.eql('saved');
|
||||
});
|
||||
|
||||
// This is a special case for iOS requests
|
||||
it('will round a priority (difficulty)', async () => {
|
||||
daily = await user.put(`/tasks/${daily._id}`, {
|
||||
alias: 'alias',
|
||||
priority: 0.10000000000005,
|
||||
});
|
||||
|
||||
expect(daily.priority).to.eql(0.1);
|
||||
});
|
||||
});
|
||||
|
||||
context('habits', () => {
|
||||
|
||||
Reference in New Issue
Block a user