diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-06 11:45:24 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-06 11:45:24 +0200 |
commit | 2769e297ca6703f761f9b57792585eb1fc5aac49 (patch) | |
tree | 02969989eb6f19a3f4ca8d75b882199662fe00e1 /server/tests/api/check-params/video-captions.ts | |
parent | 9484e1f6fcc9cbc118b01579acd1fd6d49bfce2e (diff) | |
download | PeerTube-2769e297ca6703f761f9b57792585eb1fc5aac49.tar.gz PeerTube-2769e297ca6703f761f9b57792585eb1fc5aac49.tar.zst PeerTube-2769e297ca6703f761f9b57792585eb1fc5aac49.zip |
Fix caption upload on Mac OS
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') |