aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/videos/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/videos/videos.ts')
-rw-r--r--server/tests/utils/videos/videos.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts
index 9a4af0b9f..a06078d40 100644
--- a/server/tests/utils/videos/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -248,6 +248,7 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg
248 channelId: defaultChannelId, 248 channelId: defaultChannelId,
249 nsfw: true, 249 nsfw: true,
250 description: 'my super description', 250 description: 'my super description',
251 support: 'my super support text',
251 tags: [ 'tag' ], 252 tags: [ 'tag' ],
252 privacy: VideoPrivacy.PUBLIC, 253 privacy: VideoPrivacy.PUBLIC,
253 commentsEnabled: true, 254 commentsEnabled: true,
@@ -277,6 +278,10 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg
277 req.field('licence', attributes.licence.toString()) 278 req.field('licence', attributes.licence.toString())
278 } 279 }
279 280
281 for (let i = 0; i < attributes.tags.length; i++) {
282 req.field('tags[' + i + ']', attributes.tags[i])
283 }
284
280 if (attributes.thumbnailfile !== undefined) { 285 if (attributes.thumbnailfile !== undefined) {
281 req.attach('thumbnailfile', buildAbsoluteFixturePath(attributes.thumbnailfile)) 286 req.attach('thumbnailfile', buildAbsoluteFixturePath(attributes.thumbnailfile))
282 } 287 }
@@ -284,10 +289,6 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg
284 req.attach('previewfile', buildAbsoluteFixturePath(attributes.previewfile)) 289 req.attach('previewfile', buildAbsoluteFixturePath(attributes.previewfile))
285 } 290 }
286 291
287 for (let i = 0; i < attributes.tags.length; i++) {
288 req.field('tags[' + i + ']', attributes.tags[i])
289 }
290
291 return req.attach('videofile', buildAbsoluteFixturePath(attributes.fixture)) 292 return req.attach('videofile', buildAbsoluteFixturePath(attributes.fixture))
292 .expect(specialStatus) 293 .expect(specialStatus)
293} 294}
@@ -366,6 +367,7 @@ async function completeVideoCheck (
366 nsfw: boolean 367 nsfw: boolean
367 commentsEnabled: boolean 368 commentsEnabled: boolean
368 description: string 369 description: string
370 support: string
369 host: string 371 host: string
370 account: string 372 account: string
371 isLocal: boolean, 373 isLocal: boolean,