aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-08 11:49:38 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commita2470c9f4bfc7f49f4b94de935bacdd53fd54f29 (patch)
treecb6b6b33d1a404fe31547c004241a7eb9743b64e /server/tests/api/check-params
parente3d15a6a9aed97a004d9dac1b7a6499d794e080a (diff)
downloadPeerTube-a2470c9f4bfc7f49f4b94de935bacdd53fd54f29.tar.gz
PeerTube-a2470c9f4bfc7f49f4b94de935bacdd53fd54f29.tar.zst
PeerTube-a2470c9f4bfc7f49f4b94de935bacdd53fd54f29.zip
Introduce captions command
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r--server/tests/api/check-params/video-captions.ts11
1 files changed, 4 insertions, 7 deletions
diff --git a/server/tests/api/check-params/video-captions.ts b/server/tests/api/check-params/video-captions.ts
index c0595c04d..baab0f276 100644
--- a/server/tests/api/check-params/video-captions.ts
+++ b/server/tests/api/check-params/video-captions.ts
@@ -1,8 +1,7 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4import { VideoCreateResult } from '@shared/models' 4import { HttpStatusCode } from '@shared/core-utils'
5import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
6import { 5import {
7 buildAbsoluteFixturePath, 6 buildAbsoluteFixturePath,
8 cleanupTests, 7 cleanupTests,
@@ -15,8 +14,8 @@ import {
15 setAccessTokensToServers, 14 setAccessTokensToServers,
16 uploadVideo, 15 uploadVideo,
17 userLogin 16 userLogin
18} from '../../../../shared/extra-utils' 17} from '@shared/extra-utils'
19import { createVideoCaption } from '../../../../shared/extra-utils/videos/video-captions' 18import { VideoCreateResult } from '@shared/models'
20 19
21describe('Test video captions API validator', function () { 20describe('Test video captions API validator', function () {
22 const path = '/api/v1/videos/' 21 const path = '/api/v1/videos/'
@@ -159,9 +158,7 @@ describe('Test video captions API validator', function () {
159 // }) 158 // })
160 159
161 it('Should succeed with a valid captionfile extension and octet-stream mime type', async function () { 160 it('Should succeed with a valid captionfile extension and octet-stream mime type', async function () {
162 await createVideoCaption({ 161 await server.captionsCommand.createVideoCaption({
163 url: server.url,
164 accessToken: server.accessToken,
165 language: 'zh', 162 language: 'zh',
166 videoId: video.uuid, 163 videoId: video.uuid,
167 fixture: 'subtitle-good.srt', 164 fixture: 'subtitle-good.srt',