X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fvideos.ts;h=00a209665d7ed211f0b2e1887300205ff0857826;hb=e11f68a3562d2468480c396f47f1bdd2a306e17a;hp=5860e91951bd6d719308073fce768fbc475aa4ba;hpb=11474c3cd904fa0fc07fc0a3a9a35496da17f300;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts index 5860e9195..00a209665 100644 --- a/server/tests/api/check-params/videos.ts +++ b/server/tests/api/check-params/videos.ts @@ -189,14 +189,6 @@ describe('Test videos API validator', function () { await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) }) - it('Should fail without a category', async function () { - const fields = getCompleteVideoUploadAttributes() - delete fields.category - - const attaches = getVideoUploadAttaches - await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) - }) - it('Should fail with a bad category', async function () { const fields = getCompleteVideoUploadAttributes() fields.category = 125 @@ -205,14 +197,6 @@ describe('Test videos API validator', function () { await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) }) - it('Should fail without a licence', async function () { - const fields = getCompleteVideoUploadAttributes() - delete fields.licence - - const attaches = getVideoUploadAttaches() - await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) - }) - it('Should fail with a bad licence', async function () { const fields = getCompleteVideoUploadAttributes() fields.licence = 125 @@ -245,14 +229,6 @@ describe('Test videos API validator', function () { await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) }) - it('Should fail without description', async function () { - const fields = getCompleteVideoUploadAttributes() - delete fields.description - - const attaches = getVideoUploadAttaches() - await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) - }) - it('Should fail with a long description', async function () { const fields = getCompleteVideoUploadAttributes() fields.description = 'my super description which is very very very very very very very very very very very very long'.repeat(35) @@ -333,14 +309,6 @@ describe('Test videos API validator', function () { await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) }) - it('Should fail with a too big duration', async function () { - const fields = getCompleteVideoUploadAttributes() - const attaches = { - 'videofile': join(__dirname, '..', 'fixtures', 'video_too_long.webm') - } - await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) - }) - it('Should succeed with the correct parameters', async function () { this.timeout(10000) @@ -473,7 +441,7 @@ describe('Test videos API validator', function () { it('Should fail with a video of another user') - it('Should fail with a video of another pod') + it('Should fail with a video of another server') it('Should succeed with the correct parameters', async function () { const fields = getCompleteVideoUpdateAttributes() @@ -584,7 +552,7 @@ describe('Test videos API validator', function () { it('Should fail with a video of another user') - it('Should fail with a video of another pod') + it('Should fail with a video of another server') it('Should succeed with the correct parameters') })