fix mongoose issue

This commit is contained in:
Matteo Pagliazzi
2019-10-13 18:31:43 +02:00
parent a0e5a56bf2
commit a1e3127d36
4 changed files with 3 additions and 14 deletions

View File

@@ -61,15 +61,4 @@ describe('POST /user/push-devices', () => {
expect(user.pushDevices[0].type).to.equal(type);
expect(user.pushDevices[0].regId).to.equal(regId);
});
it('removes a push device to the user', async () => {
await user.post('/user/push-devices', { type, regId });
const response = await user.del(`/user/push-devices/${regId}`);
await user.sync();
expect(response.message).to.equal(t('pushDeviceRemoved'));
expect(response.data[0]).to.not.exist;
expect(user.pushDevices[0]).to.not.exist;
});
});