aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
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',