aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/notifications')
-rw-r--r--server/tests/api/notifications/moderation-notifications.ts12
1 files changed, 5 insertions, 7 deletions
diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts
index 605b41947..52ade0548 100644
--- a/server/tests/api/notifications/moderation-notifications.ts
+++ b/server/tests/api/notifications/moderation-notifications.ts
@@ -4,7 +4,6 @@ import 'mocha'
4import { buildUUID } from '@server/helpers/uuid' 4import { buildUUID } from '@server/helpers/uuid'
5import { 5import {
6 addVideoCommentThread, 6 addVideoCommentThread,
7 addVideoToBlacklist,
8 checkAbuseStateChange, 7 checkAbuseStateChange,
9 checkAutoInstanceFollowing, 8 checkAutoInstanceFollowing,
10 CheckerBaseParams, 9 CheckerBaseParams,
@@ -28,7 +27,6 @@ import {
28 MockSmtpServer, 27 MockSmtpServer,
29 prepareNotificationsTest, 28 prepareNotificationsTest,
30 registerUser, 29 registerUser,
31 removeVideoFromBlacklist,
32 ServerInfo, 30 ServerInfo,
33 uploadVideo, 31 uploadVideo,
34 wait, 32 wait,
@@ -297,7 +295,7 @@ describe('Test moderation notifications', function () {
297 const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name }) 295 const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name })
298 const uuid = resVideo.body.video.uuid 296 const uuid = resVideo.body.video.uuid
299 297
300 await addVideoToBlacklist(servers[0].url, servers[0].accessToken, uuid) 298 await servers[0].blacklistCommand.add({ videoId: uuid })
301 299
302 await waitJobs(servers) 300 await waitJobs(servers)
303 await checkNewBlacklistOnMyVideo(baseParams, uuid, name, 'blacklist') 301 await checkNewBlacklistOnMyVideo(baseParams, uuid, name, 'blacklist')
@@ -310,10 +308,10 @@ describe('Test moderation notifications', function () {
310 const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name }) 308 const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name })
311 const uuid = resVideo.body.video.uuid 309 const uuid = resVideo.body.video.uuid
312 310
313 await addVideoToBlacklist(servers[0].url, servers[0].accessToken, uuid) 311 await servers[0].blacklistCommand.add({ videoId: uuid })
314 312
315 await waitJobs(servers) 313 await waitJobs(servers)
316 await removeVideoFromBlacklist(servers[0].url, servers[0].accessToken, uuid) 314 await servers[0].blacklistCommand.remove({ videoId: uuid })
317 await waitJobs(servers) 315 await waitJobs(servers)
318 316
319 await wait(500) 317 await wait(500)
@@ -517,7 +515,7 @@ describe('Test moderation notifications', function () {
517 it('Should send video published and unblacklist after video unblacklisted', async function () { 515 it('Should send video published and unblacklist after video unblacklisted', async function () {
518 this.timeout(40000) 516 this.timeout(40000)
519 517
520 await removeVideoFromBlacklist(servers[0].url, servers[0].accessToken, videoUUID) 518 await servers[0].blacklistCommand.remove({ videoId: videoUUID })
521 519
522 await waitJobs(servers) 520 await waitJobs(servers)
523 521
@@ -554,7 +552,7 @@ describe('Test moderation notifications', function () {
554 const resVideo = await uploadVideo(servers[0].url, userAccessToken, data) 552 const resVideo = await uploadVideo(servers[0].url, userAccessToken, data)
555 const uuid = resVideo.body.video.uuid 553 const uuid = resVideo.body.video.uuid
556 554
557 await removeVideoFromBlacklist(servers[0].url, servers[0].accessToken, uuid) 555 await servers[0].blacklistCommand.remove({ videoId: uuid })
558 556
559 await waitJobs(servers) 557 await waitJobs(servers)
560 await checkNewBlacklistOnMyVideo(userBaseParams, uuid, name, 'unblacklist') 558 await checkNewBlacklistOnMyVideo(userBaseParams, uuid, name, 'unblacklist')