diff options
Diffstat (limited to 'server/tests/api/check-params/videos.ts')
-rw-r--r-- | server/tests/api/check-params/videos.ts | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts index 878ffe025..3eccaee44 100644 --- a/server/tests/api/check-params/videos.ts +++ b/server/tests/api/check-params/videos.ts | |||
@@ -185,7 +185,8 @@ describe('Test videos API validator', function () { | |||
185 | support: 'my super support text', | 185 | support: 'my super support text', |
186 | tags: [ 'tag1', 'tag2' ], | 186 | tags: [ 'tag1', 'tag2' ], |
187 | privacy: VideoPrivacy.PUBLIC, | 187 | privacy: VideoPrivacy.PUBLIC, |
188 | channelId: channelId | 188 | channelId: channelId, |
189 | originallyPublishedAt: new Date().toISOString() | ||
189 | } | 190 | } |
190 | }) | 191 | }) |
191 | 192 | ||
@@ -313,6 +314,13 @@ describe('Test videos API validator', function () { | |||
313 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 314 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
314 | }) | 315 | }) |
315 | 316 | ||
317 | it('Should fail with a bad originally published at attribute', async function () { | ||
318 | const fields = immutableAssign(baseCorrectParams, { 'originallyPublishedAt': 'toto' }) | ||
319 | const attaches = baseCorrectAttaches | ||
320 | |||
321 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | ||
322 | }) | ||
323 | |||
316 | it('Should fail without an input file', async function () { | 324 | it('Should fail without an input file', async function () { |
317 | const fields = baseCorrectParams | 325 | const fields = baseCorrectParams |
318 | const attaches = {} | 326 | const attaches = {} |
@@ -534,6 +542,12 @@ describe('Test videos API validator', function () { | |||
534 | await makePutBodyRequest({ url: server.url, path: path + videoId, token: server.accessToken, fields }) | 542 | await makePutBodyRequest({ url: server.url, path: path + videoId, token: server.accessToken, fields }) |
535 | }) | 543 | }) |
536 | 544 | ||
545 | it('Should fail with a bad originally published at param', async function () { | ||
546 | const fields = immutableAssign(baseCorrectParams, { originallyPublishedAt: 'toto' }) | ||
547 | |||
548 | await makePutBodyRequest({ url: server.url, path: path + videoId, token: server.accessToken, fields }) | ||
549 | }) | ||
550 | |||
537 | it('Should fail with an incorrect thumbnail file', async function () { | 551 | it('Should fail with an incorrect thumbnail file', async function () { |
538 | const fields = baseCorrectParams | 552 | const fields = baseCorrectParams |
539 | const attaches = { | 553 | const attaches = { |