+ await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
+ })
+
+ it('Should fail with an incorrect input file', async function () {
+ const fields = baseCorrectParams
+ let attaches = {
+ videofile: join(root(), 'server', 'tests', 'fixtures', 'video_short_fake.webm')
+ }
+ await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
+
+ attaches = {
+ videofile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mkv')
+ }
+ await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
+ })
+
+ it('Should fail with an incorrect thumbnail file', async function () {
+ const fields = baseCorrectParams
+ const attaches = {
+ thumbnailfile: join(root(), 'server', 'tests', 'fixtures', 'avatar.png'),
+ videofile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mp4')
+ }
+
+ await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
+ })
+
+ it('Should fail with a big thumbnail file', async function () {
+ const fields = baseCorrectParams
+ const attaches = {
+ thumbnailfile: join(root(), 'server', 'tests', 'fixtures', 'avatar-big.png'),
+ videofile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mp4')
+ }
+
+ await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
+ })
+
+ it('Should fail with an incorrect preview file', async function () {
+ const fields = baseCorrectParams
+ const attaches = {
+ previewfile: join(root(), 'server', 'tests', 'fixtures', 'avatar.png'),
+ videofile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mp4')
+ }
+
+ await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })