diff options
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r-- | server/tests/api/check-params/video-channels.ts | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts index 65bc20613..ff04f6b03 100644 --- a/server/tests/api/check-params/video-channels.ts +++ b/server/tests/api/check-params/video-channels.ts | |||
@@ -67,8 +67,30 @@ describe('Test video channels API validator', function () { | |||
67 | }) | 67 | }) |
68 | 68 | ||
69 | describe('When listing account video channels', function () { | 69 | describe('When listing account video channels', function () { |
70 | const accountChannelPath = '/api/v1/accounts/fake/video-channels' | ||
71 | |||
72 | it('Should fail with a bad start pagination', async function () { | ||
73 | await checkBadStartPagination(server.url, accountChannelPath, server.accessToken) | ||
74 | }) | ||
75 | |||
76 | it('Should fail with a bad count pagination', async function () { | ||
77 | await checkBadCountPagination(server.url, accountChannelPath, server.accessToken) | ||
78 | }) | ||
79 | |||
80 | it('Should fail with an incorrect sort', async function () { | ||
81 | await checkBadSortPagination(server.url, accountChannelPath, server.accessToken) | ||
82 | }) | ||
83 | |||
70 | it('Should fail with a unknown account', async function () { | 84 | it('Should fail with a unknown account', async function () { |
71 | await getAccountVideoChannelsList(server.url, 'unknown', 404) | 85 | await getAccountVideoChannelsList({ url: server.url, accountName: 'unknown', specialStatus: 404 }) |
86 | }) | ||
87 | |||
88 | it('Should succeed with the correct parameters', async function () { | ||
89 | await makeGetRequest({ | ||
90 | url: server.url, | ||
91 | path: accountChannelPath, | ||
92 | statusCodeExpected: 200 | ||
93 | }) | ||
72 | }) | 94 | }) |
73 | }) | 95 | }) |
74 | 96 | ||