mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
fix api v2 tests, do not allow task.value to be updated
This commit is contained in:
@@ -28,17 +28,15 @@ describe('PUT /user/tasks/:id', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('updates text, attribute, priority, value and notes', async () => {
|
it('updates text, attribute, priority and notes', async () => {
|
||||||
return user.put(`/user/tasks/${task.id}`, {
|
return user.put(`/user/tasks/${task.id}`, {
|
||||||
text: 'new text',
|
text: 'new text',
|
||||||
notes: 'new notes',
|
notes: 'new notes',
|
||||||
value: 10000,
|
|
||||||
priority: 0.1,
|
priority: 0.1,
|
||||||
attribute: 'str',
|
attribute: 'str',
|
||||||
}).then((updatedTask) => {
|
}).then((updatedTask) => {
|
||||||
expect(updatedTask.text).to.eql('new text');
|
expect(updatedTask.text).to.eql('new text');
|
||||||
expect(updatedTask.notes).to.eql('new notes');
|
expect(updatedTask.notes).to.eql('new notes');
|
||||||
expect(updatedTask.value).to.eql(10000);
|
|
||||||
expect(updatedTask.priority).to.eql(0.1);
|
expect(updatedTask.priority).to.eql(0.1);
|
||||||
expect(updatedTask.attribute).to.eql('str');
|
expect(updatedTask.attribute).to.eql('str');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user