diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-29 15:09:38 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-29 15:09:38 +0200 |
commit | 91b6631984fa7097bd60aa013d1cf041d7b95f58 (patch) | |
tree | 717cc94c3cba7b02ba404f2536ebc76118adf504 /server/tests/api/check-params/video-channels.ts | |
parent | b247a132709eb212fef4f77c4912dc0ec108f36b (diff) | |
download | PeerTube-91b6631984fa7097bd60aa013d1cf041d7b95f58.tar.gz PeerTube-91b6631984fa7097bd60aa013d1cf041d7b95f58.tar.zst PeerTube-91b6631984fa7097bd60aa013d1cf041d7b95f58.zip |
Add pagination to account video channels endpoint
Diffstat (limited to 'server/tests/api/check-params/video-channels.ts')
-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 | ||