diff options
Diffstat (limited to 'server/tests/api/check-params/video-channels.ts')
-rw-r--r-- | server/tests/api/check-params/video-channels.ts | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts index 9024126c0..1782474fd 100644 --- a/server/tests/api/check-params/video-channels.ts +++ b/server/tests/api/check-params/video-channels.ts | |||
@@ -1,10 +1,8 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import { expect } from 'chai' |
4 | import * as chai from 'chai' | ||
5 | import { omit } from 'lodash' | ||
6 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared' | 4 | import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared' |
7 | import { buildAbsoluteFixturePath } from '@shared/core-utils' | 5 | import { buildAbsoluteFixturePath, omit } from '@shared/core-utils' |
8 | import { HttpStatusCode, VideoChannelUpdate } from '@shared/models' | 6 | import { HttpStatusCode, VideoChannelUpdate } from '@shared/models' |
9 | import { | 7 | import { |
10 | ChannelsCommand, | 8 | ChannelsCommand, |
@@ -18,8 +16,6 @@ import { | |||
18 | setAccessTokensToServers | 16 | setAccessTokensToServers |
19 | } from '@shared/server-commands' | 17 | } from '@shared/server-commands' |
20 | 18 | ||
21 | const expect = chai.expect | ||
22 | |||
23 | describe('Test video channels API validator', function () { | 19 | describe('Test video channels API validator', function () { |
24 | const videoChannelPath = '/api/v1/video-channels' | 20 | const videoChannelPath = '/api/v1/video-channels' |
25 | let server: PeerTubeServer | 21 | let server: PeerTubeServer |
@@ -121,7 +117,7 @@ describe('Test video channels API validator', function () { | |||
121 | }) | 117 | }) |
122 | 118 | ||
123 | it('Should fail without a name', async function () { | 119 | it('Should fail without a name', async function () { |
124 | const fields = omit(baseCorrectParams, 'name') | 120 | const fields = omit(baseCorrectParams, [ 'name' ]) |
125 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) | 121 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) |
126 | }) | 122 | }) |
127 | 123 | ||
@@ -131,7 +127,7 @@ describe('Test video channels API validator', function () { | |||
131 | }) | 127 | }) |
132 | 128 | ||
133 | it('Should fail without a name', async function () { | 129 | it('Should fail without a name', async function () { |
134 | const fields = omit(baseCorrectParams, 'displayName') | 130 | const fields = omit(baseCorrectParams, [ 'displayName' ]) |
135 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) | 131 | await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) |
136 | }) | 132 | }) |
137 | 133 | ||