mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix tests
This commit is contained in:
@@ -180,7 +180,7 @@ describe('Test video lives API validator', function () {
|
||||
it('Should fail with an incorrect thumbnail file', async function () {
|
||||
const fields = baseCorrectParams
|
||||
const attaches = {
|
||||
thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'avatar.png')
|
||||
thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4')
|
||||
}
|
||||
|
||||
await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
|
||||
@@ -189,7 +189,7 @@ describe('Test video lives API validator', function () {
|
||||
it('Should fail with a big thumbnail file', async function () {
|
||||
const fields = baseCorrectParams
|
||||
const attaches = {
|
||||
thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png')
|
||||
thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'preview-big.png')
|
||||
}
|
||||
|
||||
await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
|
||||
@@ -198,7 +198,7 @@ describe('Test video lives API validator', function () {
|
||||
it('Should fail with an incorrect preview file', async function () {
|
||||
const fields = baseCorrectParams
|
||||
const attaches = {
|
||||
previewfile: join(__dirname, '..', '..', 'fixtures', 'avatar.png')
|
||||
previewfile: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4')
|
||||
}
|
||||
|
||||
await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
|
||||
@@ -207,7 +207,7 @@ describe('Test video lives API validator', function () {
|
||||
it('Should fail with a big preview file', async function () {
|
||||
const fields = baseCorrectParams
|
||||
const attaches = {
|
||||
previewfile: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png')
|
||||
previewfile: join(__dirname, '..', '..', 'fixtures', 'preview-big.png')
|
||||
}
|
||||
|
||||
await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
|
||||
|
||||
@@ -201,7 +201,7 @@ describe('Test video imports API validator', function () {
|
||||
it('Should fail with an incorrect thumbnail file', async function () {
|
||||
const fields = baseCorrectParams
|
||||
const attaches = {
|
||||
thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'avatar.png')
|
||||
thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4')
|
||||
}
|
||||
|
||||
await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
|
||||
@@ -210,7 +210,7 @@ describe('Test video imports API validator', function () {
|
||||
it('Should fail with a big thumbnail file', async function () {
|
||||
const fields = baseCorrectParams
|
||||
const attaches = {
|
||||
thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png')
|
||||
thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'preview-big.png')
|
||||
}
|
||||
|
||||
await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
|
||||
@@ -219,7 +219,7 @@ describe('Test video imports API validator', function () {
|
||||
it('Should fail with an incorrect preview file', async function () {
|
||||
const fields = baseCorrectParams
|
||||
const attaches = {
|
||||
previewfile: join(__dirname, '..', '..', 'fixtures', 'avatar.png')
|
||||
previewfile: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4')
|
||||
}
|
||||
|
||||
await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
|
||||
@@ -228,7 +228,7 @@ describe('Test video imports API validator', function () {
|
||||
it('Should fail with a big preview file', async function () {
|
||||
const fields = baseCorrectParams
|
||||
const attaches = {
|
||||
previewfile: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png')
|
||||
previewfile: join(__dirname, '..', '..', 'fixtures', 'preview-big.png')
|
||||
}
|
||||
|
||||
await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
|
||||
|
||||
@@ -251,7 +251,14 @@ describe('Test video playlists API validator', function () {
|
||||
})
|
||||
|
||||
it('Should fail with an incorrect thumbnail file', async function () {
|
||||
const params = getBase({ thumbnailfile: 'avatar.png' })
|
||||
const params = getBase({ thumbnailfile: 'video_short.mp4' })
|
||||
|
||||
await createVideoPlaylist(params)
|
||||
await updateVideoPlaylist(getUpdate(params, playlistUUID))
|
||||
})
|
||||
|
||||
it('Should fail with a thumbnail file too big', async function () {
|
||||
const params = getBase({ thumbnailfile: 'preview-big.png' })
|
||||
|
||||
await createVideoPlaylist(params)
|
||||
await updateVideoPlaylist(getUpdate(params, playlistUUID))
|
||||
|
||||
@@ -373,7 +373,7 @@ describe('Test videos API validator', function () {
|
||||
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')
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ describe('Test videos API validator', function () {
|
||||
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')
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ describe('Test videos API validator', function () {
|
||||
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')
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ describe('Test videos API validator', function () {
|
||||
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')
|
||||
}
|
||||
|
||||
@@ -581,7 +581,7 @@ describe('Test videos API validator', function () {
|
||||
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({
|
||||
@@ -597,7 +597,7 @@ describe('Test videos API validator', function () {
|
||||
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({
|
||||
@@ -613,7 +613,7 @@ describe('Test videos API validator', function () {
|
||||
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({
|
||||
@@ -629,7 +629,7 @@ describe('Test videos API validator', function () {
|
||||
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({
|
||||
|
||||
Reference in New Issue
Block a user