mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-04 04:59:40 +00:00
Added git score approved task test
This commit is contained in:
parent
9b515ebdd1
commit
ad5045bc09
1 changed files with 7 additions and 3 deletions
|
|
@ -45,10 +45,14 @@ describe('POST /tasks/:id/score/:direction', () => {
|
|||
});
|
||||
});
|
||||
|
||||
xit('allows a user to score an apporoved task', async () => {
|
||||
it('allows a user to score an apporoved task', async () => {
|
||||
let memberTasks = await member.get('/tasks/user');
|
||||
let syncedTask = find(memberTasks, findAssignedTask);
|
||||
|
||||
await user.post(`/tasks/${task._id}/approve/${member._id}`);
|
||||
await user.post(`/tasks/${task._id}/score/up`);
|
||||
let updatedTask = await user.get(`/tasks/${task._id}`);
|
||||
|
||||
await member.post(`/tasks/${syncedTask._id}/score/up`);
|
||||
let updatedTask = await member.get(`/tasks/${syncedTask._id}`);
|
||||
|
||||
expect(updatedTask.completed).to.equal(true);
|
||||
expect(updatedTask.dateCompleted).to.be.a('string'); // date gets converted to a string as json doesn't have a Date type
|
||||
|
|
|
|||
Loading…
Reference in a new issue