Kaynağa Gözat

Add mention from other user to see if only notifications for your account are retrieved

sbkwgh 8 yıl önce
ebeveyn
işleme
940ba2ea3f
1 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 6 1
      test/notification.js

+ 6 - 1
test/notification.js

@@ -92,10 +92,15 @@ describe('Notifications', () => {
 				.set('content-type', 'application/json')
 				.send({ threadId: 1, content: 'POST 1', mentions: ['adminaccount'] })
 
+			await adminaccount
+				.post('/api/v1/post')
+				.set('content-type', 'application/json')
+				.send({ threadId: 1, content: 'POST 2', mentions: ['useraccount'] })
+
 			await user
 				.post('/api/v1/post')
 				.set('content-type', 'application/json')
-				.send({ threadId: 1, content: 'POST 2', mentions: ['adminaccount'] })
+				.send({ threadId: 1, content: 'POST 3', mentions: ['adminaccount'] })
 
 			let res = await admin.get('/api/v1/notification')