Moved approval to subdoc
This commit is contained in:
@@ -63,8 +63,8 @@ describe('POST /tasks/:id/approve/:userId', () => {
|
||||
expect(member.notifications[0].type).to.equal('GROUP_TASK_APPROVAL');
|
||||
expect(member.notifications[0].data.message).to.equal(t('yourTaskHasBeenApproved'));
|
||||
|
||||
expect(syncedTask.group.approved).to.be.true;
|
||||
expect(syncedTask.group.approvingUser).to.equal(user._id);
|
||||
expect(syncedTask.group.approvedDate).to.be.a('string'); // date gets converted to a string as json doesn't have a Date type
|
||||
expect(syncedTask.group.approval.approved).to.be.true;
|
||||
expect(syncedTask.group.approval.approvingUser).to.equal(user._id);
|
||||
expect(syncedTask.group.approval.dateApproved).to.be.a('string'); // date gets converted to a string as json doesn't have a Date type
|
||||
});
|
||||
});
|
||||
|
||||
@@ -50,8 +50,8 @@ describe('POST /tasks/:id/score/:direction', () => {
|
||||
}));
|
||||
|
||||
expect(response.message).to.equal(t('taskApprovalHasBeenRequested'));
|
||||
expect(updatedTask.group.approvalRequested).to.equal(true);
|
||||
expect(updatedTask.group.approvalRequestedDate).to.be.a('string'); // date gets converted to a string as json doesn't have a Date type
|
||||
expect(updatedTask.group.approval.requested).to.equal(true);
|
||||
expect(updatedTask.group.approval.requestedDate).to.be.a('string'); // date gets converted to a string as json doesn't have a Date type
|
||||
});
|
||||
|
||||
it('errors when approval has already been requested', async () => {
|
||||
|
||||
Reference in New Issue
Block a user