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 })
+ await makeUploadRequest({
+ url: server.url,
+ path: path + '/upload',
+ token: server.accessToken,
+ fields,
+ attaches,
+ statusCodeExpected: HttpStatusCode.UNPROCESSABLE_ENTITY_422
+ })
attaches = {
videofile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mkv')
}
- await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
+ await makeUploadRequest({
+ url: server.url,
+ path: path + '/upload',
+ token: server.accessToken,
+ fields,
+ attaches,
+ statusCodeExpected: HttpStatusCode.UNSUPPORTED_MEDIA_TYPE_415
+ })
})
it('Should fail with an incorrect thumbnail file', async function () {
const fields = baseCorrectParams
const attaches = {
- thumbnailfile: join(root(), 'server', 'tests', 'fixtures', 'avatar.png'),
+ thumbnailfile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mp4'),
videofile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mp4')
}
it('Should fail with a big thumbnail file', async function () {
const fields = baseCorrectParams
const attaches = {
- thumbnailfile: join(root(), 'server', 'tests', 'fixtures', 'avatar-big.png'),
+ thumbnailfile: join(root(), 'server', 'tests', 'fixtures', 'preview-big.png'),
videofile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mp4')
}
it('Should fail with an incorrect preview file', async function () {
const fields = baseCorrectParams
const attaches = {
- previewfile: join(root(), 'server', 'tests', 'fixtures', 'avatar.png'),
+ previewfile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mp4'),
videofile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mp4')
}
it('Should fail with a big preview file', async function () {
const fields = baseCorrectParams
const attaches = {
- previewfile: join(root(), 'server', 'tests', 'fixtures', 'avatar-big.png'),
+ previewfile: join(root(), 'server', 'tests', 'fixtures', 'preview-big.png'),
videofile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mp4')
}
it('Should fail with an incorrect thumbnail file', async function () {
const fields = baseCorrectParams
const attaches = {
- thumbnailfile: join(root(), 'server', 'tests', 'fixtures', 'avatar.png')
+ thumbnailfile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mp4')
}
await makeUploadRequest({
it('Should fail with a big thumbnail file', async function () {
const fields = baseCorrectParams
const attaches = {
- thumbnailfile: join(root(), 'server', 'tests', 'fixtures', 'avatar-big.png')
+ thumbnailfile: join(root(), 'server', 'tests', 'fixtures', 'preview-big.png')
}
await makeUploadRequest({
it('Should fail with an incorrect preview file', async function () {
const fields = baseCorrectParams
const attaches = {
- previewfile: join(root(), 'server', 'tests', 'fixtures', 'avatar.png')
+ previewfile: join(root(), 'server', 'tests', 'fixtures', 'video_short.mp4')
}
await makeUploadRequest({
it('Should fail with a big preview file', async function () {
const fields = baseCorrectParams
const attaches = {
- previewfile: join(root(), 'server', 'tests', 'fixtures', 'avatar-big.png')
+ previewfile: join(root(), 'server', 'tests', 'fixtures', 'preview-big.png')
}
await makeUploadRequest({