diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-06 12:11:08 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-06 12:11:08 +0200 |
commit | 3d52b300ea79bec21f090e2447c4808307078618 (patch) | |
tree | 5a68db9d557eb9449533162cf01f974e60b16885 /server/tests/api/check-params/video-captions.ts | |
parent | 60979b076de00a7c7f6dde26617cd39357d9fc6d (diff) | |
parent | 2769e297ca6703f761f9b57792585eb1fc5aac49 (diff) | |
download | PeerTube-3d52b300ea79bec21f090e2447c4808307078618.tar.gz PeerTube-3d52b300ea79bec21f090e2447c4808307078618.tar.zst PeerTube-3d52b300ea79bec21f090e2447c4808307078618.zip |
Merge branch 'release/beta-10' into develop
Diffstat (limited to 'server/tests/api/check-params/video-captions.ts')
-rw-r--r-- | server/tests/api/check-params/video-captions.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/server/tests/api/check-params/video-captions.ts b/server/tests/api/check-params/video-captions.ts index a3d7ac35d..8d46971a1 100644 --- a/server/tests/api/check-params/video-captions.ts +++ b/server/tests/api/check-params/video-captions.ts | |||
@@ -15,6 +15,7 @@ import { | |||
15 | userLogin | 15 | userLogin |
16 | } from '../../utils' | 16 | } from '../../utils' |
17 | import { join } from 'path' | 17 | import { join } from 'path' |
18 | import { createVideoCaption } from '../../utils/videos/video-captions' | ||
18 | 19 | ||
19 | describe('Test video captions API validator', function () { | 20 | describe('Test video captions API validator', function () { |
20 | const path = '/api/v1/videos/' | 21 | const path = '/api/v1/videos/' |
@@ -143,6 +144,31 @@ describe('Test video captions API validator', function () { | |||
143 | }) | 144 | }) |
144 | }) | 145 | }) |
145 | 146 | ||
147 | // We don't check the extension yet | ||
148 | // it('Should fail with an invalid captionfile extension and octet-stream mime type', async function () { | ||
149 | // await createVideoCaption({ | ||
150 | // url: server.url, | ||
151 | // accessToken: server.accessToken, | ||
152 | // language: 'zh', | ||
153 | // videoId: videoUUID, | ||
154 | // fixture: 'subtitle-bad.txt', | ||
155 | // mimeType: 'application/octet-stream', | ||
156 | // statusCodeExpected: 400 | ||
157 | // }) | ||
158 | // }) | ||
159 | |||
160 | it('Should succeed with a valid captionfile extension and octet-stream mime type', async function () { | ||
161 | await createVideoCaption({ | ||
162 | url: server.url, | ||
163 | accessToken: server.accessToken, | ||
164 | language: 'zh', | ||
165 | videoId: videoUUID, | ||
166 | fixture: 'subtitle-good.srt', | ||
167 | mimeType: 'application/octet-stream' | ||
168 | }) | ||
169 | }) | ||
170 | |||
171 | // We don't check the file validity yet | ||
146 | // it('Should fail with an invalid captionfile srt', async function () { | 172 | // it('Should fail with an invalid captionfile srt', async function () { |
147 | // const attaches = { | 173 | // const attaches = { |
148 | // 'captionfile': join(__dirname, '..', '..', 'fixtures', 'subtitle-bad.srt') | 174 | // 'captionfile': join(__dirname, '..', '..', 'fixtures', 'subtitle-bad.srt') |