diff options
Diffstat (limited to 'server/tests/api/notifications/user-notifications.ts')
-rw-r--r-- | server/tests/api/notifications/user-notifications.ts | 5 |
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 | } |