- await makeUploadRequest({
- url: server.url,
- path: path + '/upload',
- token: server.accessToken,
- fields,
- attaches,
- statusCodeExpected: 200
- })
- }
+ expect(error.status).to.equal(HttpStatusCode.BAD_REQUEST_400)
+ expect(error['invalid-params'].language).to.exist
+ })
+
+ it('Should succeed with the correct parameters', async function () {
+ this.timeout(10000)
+
+ const fields = baseCorrectParams
+
+ {
+ const attaches = baseCorrectAttaches
+ await checkUploadVideoParam(server.url, server.accessToken, { ...fields, ...attaches }, HttpStatusCode.OK_200, mode)
+ }
+
+ {
+ const attaches = immutableAssign(baseCorrectAttaches, {
+ videofile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mp4')
+ })
+
+ await checkUploadVideoParam(server.url, server.accessToken, { ...fields, ...attaches }, HttpStatusCode.OK_200, mode)
+ }
+
+ {
+ const attaches = immutableAssign(baseCorrectAttaches, {
+ videofile: join(root(), 'server', 'tests', 'fixtures', 'video_short.ogv')
+ })
+
+ await checkUploadVideoParam(server.url, server.accessToken, { ...fields, ...attaches }, HttpStatusCode.OK_200, mode)
+ }
+ })
+ }
+
+ describe('Resumable upload', function () {
+ runSuite('resumable')
+ })
+
+ describe('Legacy upload', function () {
+ runSuite('legacy')