aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications/user-notifications.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-09 16:23:01 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commitdd0ebb715123dfa126a82d4e4fe3a04064ae77b8 (patch)
treee0741f35b31c66f09f7d9ad808b224ef86151bb1 /server/tests/api/notifications/user-notifications.ts
parent9293139fde7091e9badcafa9b570b83cea9a10ad (diff)
downloadPeerTube-dd0ebb715123dfa126a82d4e4fe3a04064ae77b8.tar.gz
PeerTube-dd0ebb715123dfa126a82d4e4fe3a04064ae77b8.tar.zst
PeerTube-dd0ebb715123dfa126a82d4e4fe3a04064ae77b8.zip
Introduce notifications command
Diffstat (limited to 'server/tests/api/notifications/user-notifications.ts')
-rw-r--r--server/tests/api/notifications/user-notifications.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index 1d159c48f..4b31edf25 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -10,7 +10,6 @@ import {
10 checkNewVideoFromSubscription, 10 checkNewVideoFromSubscription,
11 checkVideoIsPublished, 11 checkVideoIsPublished,
12 cleanupTests, 12 cleanupTests,
13 getLastNotification,
14 ImportsCommand, 13 ImportsCommand,
15 MockSmtpServer, 14 MockSmtpServer,
16 prepareNotificationsTest, 15 prepareNotificationsTest,
@@ -64,7 +63,7 @@ describe('Test user notifications', function () {
64 63
65 await uploadRandomVideoOnServers(servers, 1) 64 await uploadRandomVideoOnServers(servers, 1)
66 65
67 const notification = await getLastNotification(servers[0].url, userAccessToken) 66 const notification = await servers[0].notificationsCommand.getLastest({ token: userAccessToken })
68 expect(notification).to.be.undefined 67 expect(notification).to.be.undefined
69 68
70 expect(emails).to.have.lengthOf(0) 69 expect(emails).to.have.lengthOf(0)
@@ -245,7 +244,7 @@ describe('Test user notifications', function () {
245 await uploadRandomVideoOnServers(servers, 2, { waitTranscoding: false }) 244 await uploadRandomVideoOnServers(servers, 2, { waitTranscoding: false })
246 await waitJobs(servers) 245 await waitJobs(servers)
247 246
248 const notification = await getLastNotification(servers[0].url, userAccessToken) 247 const notification = await servers[0].notificationsCommand.getLastest({ token: userAccessToken })
249 if (notification) { 248 if (notification) {
250 expect(notification.type).to.not.equal(UserNotificationType.MY_VIDEO_PUBLISHED) 249 expect(notification.type).to.not.equal(UserNotificationType.MY_VIDEO_PUBLISHED)
251 } 250 }