aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/moderation/blocklist-notification.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-15 10:02:54 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commitd23dd9fbfc4d26026352c10f81d2795ceaf2908a (patch)
treeda82286d423c5e834a1ee2dcd5970076b8263cf1 /server/tests/api/moderation/blocklist-notification.ts
parent7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (diff)
downloadPeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.gz
PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.zst
PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.zip
Introduce videos command
Diffstat (limited to 'server/tests/api/moderation/blocklist-notification.ts')
-rw-r--r--server/tests/api/moderation/blocklist-notification.ts16
1 files changed, 4 insertions, 12 deletions
diff --git a/server/tests/api/moderation/blocklist-notification.ts b/server/tests/api/moderation/blocklist-notification.ts
index b44bcb012..92a0ec681 100644
--- a/server/tests/api/moderation/blocklist-notification.ts
+++ b/server/tests/api/moderation/blocklist-notification.ts
@@ -2,15 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { 5import { cleanupTests, doubleFollow, flushAndRunMultipleServers, ServerInfo, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
6 cleanupTests,
7 doubleFollow,
8 flushAndRunMultipleServers,
9 ServerInfo,
10 setAccessTokensToServers,
11 uploadVideo,
12 waitJobs
13} from '@shared/extra-utils'
14import { UserNotificationType } from '@shared/models' 6import { UserNotificationType } from '@shared/models'
15 7
16const expect = chai.expect 8const expect = chai.expect
@@ -44,8 +36,8 @@ describe('Test blocklist', function () {
44 await servers[0].notificationsCommand.markAsReadAll({ token: userToken2 }) 36 await servers[0].notificationsCommand.markAsReadAll({ token: userToken2 })
45 37
46 { 38 {
47 const res = await uploadVideo(servers[0].url, userToken1, { name: 'video' }) 39 const { uuid } = await servers[0].videosCommand.upload({ token: userToken1, attributes: { name: 'video' } })
48 videoUUID = res.body.video.uuid 40 videoUUID = uuid
49 41
50 await waitJobs(servers) 42 await waitJobs(servers)
51 } 43 }
@@ -83,7 +75,7 @@ describe('Test blocklist', function () {
83 }) 75 })
84 76
85 userToken1 = await servers[0].loginCommand.getAccessToken(user) 77 userToken1 = await servers[0].loginCommand.getAccessToken(user)
86 await uploadVideo(servers[0].url, userToken1, { name: 'video user 1' }) 78 await servers[0].videosCommand.upload({ token: userToken1, attributes: { name: 'video user 1' } })
87 } 79 }
88 80
89 { 81 {