mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-04-14 11:36:45 +00:00
Fix tests being dependant on NEW_MYSTERY_ITEMS notification (#15288)
* Fix tests being dependant on NEW_MYSTERY_ITEMS notification * remove only * don’t actually need to check notification count * fix tests --------- Co-authored-by: Sabe Jones <sabrecat@gmail.com>
This commit is contained in:
parent
2483e19bee
commit
8e643747f8
2 changed files with 6 additions and 4 deletions
|
|
@ -105,9 +105,9 @@ describe('POST /tasks/:taskId/assign/:memberId', () => {
|
|||
|
||||
const groupTask = await user.get(`/tasks/group/${guild._id}`);
|
||||
|
||||
expect(member.notifications.length).to.equal(2);
|
||||
expect(member.notifications[1].type).to.equal('GROUP_TASK_ASSIGNED');
|
||||
expect(member.notifications[1].taskId).to.equal(groupTask._id);
|
||||
const lastNotification = member.notifications[member.notifications.length - 1];
|
||||
expect(lastNotification.type).to.equal('GROUP_TASK_ASSIGNED');
|
||||
expect(lastNotification.taskId).to.equal(groupTask._id);
|
||||
});
|
||||
|
||||
it('assigns a task to multiple users', async () => {
|
||||
|
|
|
|||
|
|
@ -89,10 +89,12 @@ describe('POST /tasks/:taskId/unassign/:memberId', () => {
|
|||
});
|
||||
|
||||
it('removes task assignment notification from unassigned user', async () => {
|
||||
await member.sync();
|
||||
const oldNotificationCount = member.notifications.length;
|
||||
await user.post(`/tasks/${task._id}/unassign/${member._id}`);
|
||||
|
||||
await member.sync();
|
||||
expect(member.notifications.length).to.equal(1); // mystery items
|
||||
expect(member.notifications.length).to.equal(oldNotificationCount - 1);
|
||||
});
|
||||
|
||||
it('unassigns a user and only that user from a task', async () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue