Skip to content

Commit dc69e6e

Browse files
committed
test update
1 parent d660164 commit dc69e6e

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

test/routes/notification/notifications.test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,12 @@ describe('/notification/notifications', () => {
294294
.post('/api/notification/notifications')
295295
.auth(username, password)
296296
.type('json')
297-
.send({user: testUser.ident, project: project.ident, event_type: 'test event', template: template.ident})
297+
.send({user: testUser.ident, project: project.ident, eventType: 'reportCreated', template: template.ident})
298298
.expect(HTTP_STATUS.CREATED);
299299

300300
// Check the notif was created
301301
const result = await db.models.notification.findOne({
302-
where: {project_id: project.id, user_id: testUser.id, event_type: 'test event'},
302+
where: {project_id: project.id, user_id: testUser.id, event_type: 'reportCreated'},
303303
});
304304

305305
expect(result).not.toBeNull();
@@ -316,12 +316,12 @@ describe('/notification/notifications', () => {
316316
.post('/api/notification/notifications')
317317
.auth(username, password)
318318
.type('json')
319-
.send({user_group: userGroup1.ident, project: project.ident, event_type: 'test event 5', template: template.ident})
319+
.send({user_group: userGroup1.ident, project: project.ident, eventType: 'reportCreated', template: template.ident})
320320
.expect(HTTP_STATUS.CREATED);
321321

322322
// Check the binding was created
323323
const result = await db.models.notification.findOne({
324-
where: {project_id: project.id, user_group_id: userGroup1.id, event_type: 'test event 5'},
324+
where: {project_id: project.id, user_group_id: userGroup1.id, event_type: 'reportCreated'},
325325
});
326326

327327
expect(result).not.toBeNull();
@@ -338,7 +338,7 @@ describe('/notification/notifications', () => {
338338
.post('/api/notification/notifications')
339339
.auth(username, password)
340340
.type('json')
341-
.send({user: uuidv4(), project: project.ident, event_type: 'test event 2', template: template.ident})
341+
.send({user: uuidv4(), project: project.ident, eventType: 'reportCreated', template: template.ident})
342342
.expect(HTTP_STATUS.NOT_FOUND);
343343
});
344344

@@ -347,7 +347,7 @@ describe('/notification/notifications', () => {
347347
.post('/api/notification/notifications')
348348
.auth(username, password)
349349
.type('json')
350-
.send({user: testUser.ident, project: uuidv4(), event_type: 'test event 2', template: template.ident})
350+
.send({user: testUser.ident, project: uuidv4(), eventType: 'reportCreated', template: template.ident})
351351
.expect(HTTP_STATUS.NOT_FOUND);
352352
});
353353

@@ -356,7 +356,7 @@ describe('/notification/notifications', () => {
356356
.post('/api/notification/notifications')
357357
.auth(username, password)
358358
.type('json')
359-
.send({user: testUser.ident, project: project.ident, event_type: 'test event 2', template: uuidv4()})
359+
.send({user: testUser.ident, project: project.ident, eventType: 'reportCreated', template: uuidv4()})
360360
.expect(HTTP_STATUS.NOT_FOUND);
361361
});
362362

@@ -365,7 +365,7 @@ describe('/notification/notifications', () => {
365365
.post('/api/notification/notifications')
366366
.auth(username, password)
367367
.type('json')
368-
.send({user_group: uuidv4(), project: project.ident, event_type: 'test event 7', template: template.ident})
368+
.send({user_group: uuidv4(), project: project.ident, eventType: 'reportCreated', template: template.ident})
369369
.expect(HTTP_STATUS.NOT_FOUND);
370370
});
371371
});

0 commit comments

Comments
 (0)