Fix caption validators test

pull/2188/head
Chocobozzz 2019-10-18 16:39:05 +02:00
parent 3d05209c9a
commit 39a26b2e41
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 17 additions and 16 deletions

View File

@ -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 () {