X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fvideo-channels.ts;h=5c02afd31d9fda8410ef4bad99bed4c1f8c9a708;hb=57f879a540551c3b958b0991c8e1e3657a4481d8;hp=bc2e6192eb6fefb836c8f90966e9bea30bbab7b3;hpb=4024c44f9027a32809931de0692d40d001df721c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts index bc2e6192e..5c02afd31 100644 --- a/server/tests/api/check-params/video-channels.ts +++ b/server/tests/api/check-params/video-channels.ts @@ -1,9 +1,11 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ +import 'mocha' import * as chai from 'chai' import { omit } from 'lodash' -import 'mocha' +import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' import { + buildAbsoluteFixturePath, cleanupTests, createUser, deleteVideoChannel, @@ -23,9 +25,7 @@ import { checkBadSortPagination, checkBadStartPagination } from '../../../../shared/extra-utils/requests/check-api-params' -import { join } from 'path' import { VideoChannelUpdate } from '../../../../shared/models/videos' -import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' const expect = chai.expect @@ -246,7 +246,7 @@ describe('Test video channels API validator', function () { for (const type of types) { const fields = {} const attaches = { - [type + 'file']: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4') + [type + 'file']: buildAbsoluteFixturePath('video_short.mp4') } await makeUploadRequest({ url: server.url, path: `${path}/${type}/pick`, token: server.accessToken, fields, attaches }) @@ -257,7 +257,7 @@ describe('Test video channels API validator', function () { for (const type of types) { const fields = {} const attaches = { - [type + 'file']: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') + [type + 'file']: buildAbsoluteFixturePath('avatar-big.png') } await makeUploadRequest({ url: server.url, path: `${path}/${type}/pick`, token: server.accessToken, fields, attaches }) } @@ -267,7 +267,7 @@ describe('Test video channels API validator', function () { for (const type of types) { const fields = {} const attaches = { - [type + 'file']: join(__dirname, '..', '..', 'fixtures', 'avatar.png') + [type + 'file']: buildAbsoluteFixturePath('avatar.png') } await makeUploadRequest({ url: server.url, @@ -283,7 +283,7 @@ describe('Test video channels API validator', function () { for (const type of types) { const fields = {} const attaches = { - [type + 'file']: join(__dirname, '..', '..', 'fixtures', 'avatar.png') + [type + 'file']: buildAbsoluteFixturePath('avatar.png') } await makeUploadRequest({ url: server.url,