]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/video-captions.ts
Introduce captions command
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / video-captions.ts
index c0595c04d87a78e7a98d7c0e74ceec2e7af0ef87..baab0f2764ab0fb8dcb3b51900011150e4ae8e6b 100644 (file)
@@ -1,8 +1,7 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
 import 'mocha'
-import { VideoCreateResult } from '@shared/models'
-import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
+import { HttpStatusCode } from '@shared/core-utils'
 import {
   buildAbsoluteFixturePath,
   cleanupTests,
@@ -15,8 +14,8 @@ import {
   setAccessTokensToServers,
   uploadVideo,
   userLogin
-} from '../../../../shared/extra-utils'
-import { createVideoCaption } from '../../../../shared/extra-utils/videos/video-captions'
+} from '@shared/extra-utils'
+import { VideoCreateResult } from '@shared/models'
 
 describe('Test video captions API validator', function () {
   const path = '/api/v1/videos/'
@@ -159,9 +158,7 @@ describe('Test video captions API validator', function () {
     // })
 
     it('Should succeed with a valid captionfile extension and octet-stream mime type', async function () {
-      await createVideoCaption({
-        url: server.url,
-        accessToken: server.accessToken,
+      await server.captionsCommand.createVideoCaption({
         language: 'zh',
         videoId: video.uuid,
         fixture: 'subtitle-good.srt',