]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/notifications/notifications-api.ts
Implement avatar miniatures (#4639)
[github/Chocobozzz/PeerTube.git] / server / tests / api / notifications / notifications-api.ts
index a529a9bf7b78f73ce36919d1f03a344c94d305e4..78864c8a04f8f9782e67c80798e14fcc63825ba3 100644 (file)
@@ -5,14 +5,12 @@ import * as chai from 'chai'
 import {
   CheckerBaseParams,
   checkNewVideoFromSubscription,
-  cleanupTests,
   getAllNotificationsSettings,
   MockSmtpServer,
-  PeerTubeServer,
-  prepareNotificationsTest,
-  waitJobs
-} from '@shared/extra-utils'
+  prepareNotificationsTest
+} from '@server/tests/shared'
 import { UserNotification, UserNotificationSettingValue } from '@shared/models'
+import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
 
 const expect = chai.expect
 
@@ -40,6 +38,16 @@ describe('Test notifications API', function () {
     await waitJobs([ server ])
   })
 
+  describe('Notification list & count', function () {
+
+    it('Should correctly list notifications', async function () {
+      const { data, total } = await server.notifications.list({ token: userToken, start: 0, count: 2 })
+
+      expect(data).to.have.lengthOf(2)
+      expect(total).to.equal(10)
+    })
+  })
+
   describe('Mark as read', function () {
 
     it('Should mark as read some notifications', async function () {