From 39a26b2e415a0b665828c043bbf115e97c9f2efc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 18 Oct 2019 16:39:05 +0200 Subject: [PATCH] Fix caption validators test --- .../tests/api/check-params/video-captions.ts | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/server/tests/api/check-params/video-captions.ts b/server/tests/api/check-params/video-captions.ts index 4a373d43d..6ddc20d69 100644 --- a/server/tests/api/check-params/video-captions.ts +++ b/server/tests/api/check-params/video-captions.ts @@ -124,22 +124,23 @@ describe('Test video captions API validator', function () { }) }) - it('Should fail with an invalid captionfile extension', async function () { - const attaches = { - 'captionfile': join(__dirname, '..', '..', 'fixtures', 'subtitle-bad.txt') - } - - const captionPath = path + videoUUID + '/captions/fr' - await makeUploadRequest({ - method: 'PUT', - url: server.url, - path: captionPath, - token: server.accessToken, - fields, - attaches, - statusCodeExpected: 400 - }) - }) + // We accept any file now + // it('Should fail with an invalid captionfile extension', async function () { + // const attaches = { + // 'captionfile': join(__dirname, '..', '..', 'fixtures', 'subtitle-bad.txt') + // } + // + // const captionPath = path + videoUUID + '/captions/fr' + // await makeUploadRequest({ + // method: 'PUT', + // url: server.url, + // path: captionPath, + // token: server.accessToken, + // fields, + // attaches, + // statusCodeExpected: 400 + // }) + // }) // We don't check the extension yet // it('Should fail with an invalid captionfile extension and octet-stream mime type', async function () { -- 2.25.1