fix: removing party invitations

This commit is contained in:
Husman
2016-07-18 19:18:17 -07:00
parent 590adb3438
commit a798c4ef08
3 changed files with 10 additions and 3 deletions

View File

@@ -120,11 +120,13 @@ describe('POST /groups/:groupId/removeMember/:memberId', () => {
});
it('can remove other invites', async () => {
expect(partyInvitedUser.invitations.party).to.not.be.empty;
await partyleader.post(`/groups/${party._id}/removeMember/${partyInvitedUser._id}`);
let invitedUserWithoutInvite = await partyInvitedUser.get('/user');
expect(_.findIndex(invitedUserWithoutInvite.invitations.party, {id: party._id})).eql(-1);
expect(invitedUserWithoutInvite.invitations.party).to.be.empty;
});
});
});