aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications/moderation-notifications.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-07 14:34:16 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-10 14:02:41 +0200
commit4f32032fed8587ea97d45e235b167e8958efd81f (patch)
tree6ec4ce2d5d05a275fb7eeaf3aee33c2b69ebc043 /server/tests/api/notifications/moderation-notifications.ts
parent57f6896f67cfc570cf3605dd94b0778101b2d9b9 (diff)
downloadPeerTube-4f32032fed8587ea97d45e235b167e8958efd81f.tar.gz
PeerTube-4f32032fed8587ea97d45e235b167e8958efd81f.tar.zst
PeerTube-4f32032fed8587ea97d45e235b167e8958efd81f.zip
Add migrations
Diffstat (limited to 'server/tests/api/notifications/moderation-notifications.ts')
-rw-r--r--server/tests/api/notifications/moderation-notifications.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts
index b90732a7a..a27681603 100644
--- a/server/tests/api/notifications/moderation-notifications.ts
+++ b/server/tests/api/notifications/moderation-notifications.ts
@@ -11,7 +11,7 @@ import {
11 MockInstancesIndex, 11 MockInstancesIndex,
12 registerUser, 12 registerUser,
13 removeVideoFromBlacklist, 13 removeVideoFromBlacklist,
14 reportVideoAbuse, 14 reportAbuse,
15 unfollow, 15 unfollow,
16 updateCustomConfig, 16 updateCustomConfig,
17 updateCustomSubConfig, 17 updateCustomSubConfig,
@@ -74,12 +74,12 @@ describe('Test moderation notifications', function () {
74 74
75 const name = 'video for abuse ' + uuidv4() 75 const name = 'video for abuse ' + uuidv4()
76 const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name }) 76 const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name })
77 const uuid = resVideo.body.video.uuid 77 const video = resVideo.body.video
78 78
79 await reportVideoAbuse(servers[0].url, servers[0].accessToken, uuid, 'super reason') 79 await reportAbuse({ url: servers[0].url, token: servers[0].accessToken, videoId: video.id, reason: 'super reason' })
80 80
81 await waitJobs(servers) 81 await waitJobs(servers)
82 await checkNewVideoAbuseForModerators(baseParams, uuid, name, 'presence') 82 await checkNewVideoAbuseForModerators(baseParams, video.uuid, name, 'presence')
83 }) 83 })
84 84
85 it('Should send a notification to moderators on remote video abuse', async function () { 85 it('Should send a notification to moderators on remote video abuse', async function () {
@@ -87,14 +87,14 @@ describe('Test moderation notifications', function () {
87 87
88 const name = 'video for abuse ' + uuidv4() 88 const name = 'video for abuse ' + uuidv4()
89 const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name }) 89 const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name })
90 const uuid = resVideo.body.video.uuid 90 const video = resVideo.body.video
91 91
92 await waitJobs(servers) 92 await waitJobs(servers)
93 93
94 await reportVideoAbuse(servers[1].url, servers[1].accessToken, uuid, 'super reason') 94 await reportAbuse({ url: servers[1].url, token: servers[1].accessToken, videoId: video.id, reason: 'super reason' })
95 95
96 await waitJobs(servers) 96 await waitJobs(servers)
97 await checkNewVideoAbuseForModerators(baseParams, uuid, name, 'presence') 97 await checkNewVideoAbuseForModerators(baseParams, video.uuid, name, 'presence')
98 }) 98 })
99 }) 99 })
100 100