From 8e7f08b5a5e65195ad6dd3d7850fda57021421f3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 Dec 2017 17:03:56 +0100 Subject: Make some fields optional when uploading a video --- server/tests/api/check-params/videos.ts | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'server/tests/api/check-params') diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts index 2962f5640..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) -- cgit v1.2.3