diff options
Diffstat (limited to 'server/tests/api/check-params/videos.ts')
-rw-r--r-- | server/tests/api/check-params/videos.ts | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts index 2962f5640..0aaa6e7c9 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 () { | |||
189 | await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 189 | await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
190 | }) | 190 | }) |
191 | 191 | ||
192 | it('Should fail without a category', async function () { | ||
193 | const fields = getCompleteVideoUploadAttributes() | ||
194 | delete fields.category | ||
195 | |||
196 | const attaches = getVideoUploadAttaches | ||
197 | await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | ||
198 | }) | ||
199 | |||
200 | it('Should fail with a bad category', async function () { | 192 | it('Should fail with a bad category', async function () { |
201 | const fields = getCompleteVideoUploadAttributes() | 193 | const fields = getCompleteVideoUploadAttributes() |
202 | fields.category = 125 | 194 | fields.category = 125 |
@@ -205,14 +197,6 @@ describe('Test videos API validator', function () { | |||
205 | await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 197 | await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
206 | }) | 198 | }) |
207 | 199 | ||
208 | it('Should fail without a licence', async function () { | ||
209 | const fields = getCompleteVideoUploadAttributes() | ||
210 | delete fields.licence | ||
211 | |||
212 | const attaches = getVideoUploadAttaches() | ||
213 | await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | ||
214 | }) | ||
215 | |||
216 | it('Should fail with a bad licence', async function () { | 200 | it('Should fail with a bad licence', async function () { |
217 | const fields = getCompleteVideoUploadAttributes() | 201 | const fields = getCompleteVideoUploadAttributes() |
218 | fields.licence = 125 | 202 | fields.licence = 125 |
@@ -245,14 +229,6 @@ describe('Test videos API validator', function () { | |||
245 | await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 229 | await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
246 | }) | 230 | }) |
247 | 231 | ||
248 | it('Should fail without description', async function () { | ||
249 | const fields = getCompleteVideoUploadAttributes() | ||
250 | delete fields.description | ||
251 | |||
252 | const attaches = getVideoUploadAttaches() | ||
253 | await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | ||
254 | }) | ||
255 | |||
256 | it('Should fail with a long description', async function () { | 232 | it('Should fail with a long description', async function () { |
257 | const fields = getCompleteVideoUploadAttributes() | 233 | const fields = getCompleteVideoUploadAttributes() |
258 | fields.description = 'my super description which is very very very very very very very very very very very very long'.repeat(35) | 234 | fields.description = 'my super description which is very very very very very very very very very very very very long'.repeat(35) |
@@ -345,7 +321,7 @@ describe('Test videos API validator', function () { | |||
345 | token: server.accessToken, | 321 | token: server.accessToken, |
346 | fields, | 322 | fields, |
347 | attaches, | 323 | attaches, |
348 | statusCodeExpected: 204 | 324 | statusCodeExpected: 200 |
349 | }) | 325 | }) |
350 | 326 | ||
351 | attaches.videofile = join(__dirname, '..', 'fixtures', 'video_short.mp4') | 327 | attaches.videofile = join(__dirname, '..', 'fixtures', 'video_short.mp4') |
@@ -355,7 +331,7 @@ describe('Test videos API validator', function () { | |||
355 | token: server.accessToken, | 331 | token: server.accessToken, |
356 | fields, | 332 | fields, |
357 | attaches, | 333 | attaches, |
358 | statusCodeExpected: 204 | 334 | statusCodeExpected: 200 |
359 | }) | 335 | }) |
360 | 336 | ||
361 | attaches.videofile = join(__dirname, '..', 'fixtures', 'video_short.ogv') | 337 | attaches.videofile = join(__dirname, '..', 'fixtures', 'video_short.ogv') |
@@ -365,7 +341,7 @@ describe('Test videos API validator', function () { | |||
365 | token: server.accessToken, | 341 | token: server.accessToken, |
366 | fields, | 342 | fields, |
367 | attaches, | 343 | attaches, |
368 | statusCodeExpected: 204 | 344 | statusCodeExpected: 200 |
369 | }) | 345 | }) |
370 | }) | 346 | }) |
371 | }) | 347 | }) |