mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-29 06:07:32 +00:00
27 lines
649 B
JavaScript
27 lines
649 B
JavaScript
|
|
import {
|
||
|
|
generateUser,
|
||
|
|
translate as t,
|
||
|
|
} from '../../../../helpers/api-v3-integration.helper';
|
||
|
|
import { v4 as generateUUID } from 'uuid';
|
||
|
|
|
||
|
|
describe('POST /notifications/:notificationId/read', () => {
|
||
|
|
let user;
|
||
|
|
|
||
|
|
before(async () => {
|
||
|
|
user = await generateUser();
|
||
|
|
});
|
||
|
|
|
||
|
|
it('errors when notification is not found', async () => {
|
||
|
|
let dummyId = generateUUID();
|
||
|
|
await expect(user.post(`/notifications/${dummyId}/read`))
|
||
|
|
.to.eventually.be.rejected.and.eql({
|
||
|
|
code: 404,
|
||
|
|
error: 'NotFound',
|
||
|
|
message: t('messageNotificationNotFound'),
|
||
|
|
});
|
||
|
|
});
|
||
|
|
|
||
|
|
xit('removes a notification', async () => {
|
||
|
|
});
|
||
|
|
});
|