aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/search.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-17 16:02:38 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-06-25 14:44:01 +0200
commit37a44fc915eef2140e22ceb96aba6b6eb2509007 (patch)
treedd4a370ecc96cf38c99b940261aadc27065da7ae /server/tests/api/check-params/search.ts
parent33eb19e5199cc9fa4d73c6675c97508e3e072ef9 (diff)
downloadPeerTube-37a44fc915eef2140e22ceb96aba6b6eb2509007.tar.gz
PeerTube-37a44fc915eef2140e22ceb96aba6b6eb2509007.tar.zst
PeerTube-37a44fc915eef2140e22ceb96aba6b6eb2509007.zip
Add ability to search playlists
Diffstat (limited to 'server/tests/api/check-params/search.ts')
-rw-r--r--server/tests/api/check-params/search.ts25
1 files changed, 25 insertions, 0 deletions
diff --git a/server/tests/api/check-params/search.ts b/server/tests/api/check-params/search.ts
index 8378c3a89..20ad46cff 100644
--- a/server/tests/api/check-params/search.ts
+++ b/server/tests/api/check-params/search.ts
@@ -140,6 +140,30 @@ describe('Test videos API validator', function () {
140 }) 140 })
141 }) 141 })
142 142
143 describe('When searching video playlists', function () {
144 const path = '/api/v1/search/video-playlists/'
145
146 const query = {
147 search: 'coucou'
148 }
149
150 it('Should fail with a bad start pagination', async function () {
151 await checkBadStartPagination(server.url, path, null, query)
152 })
153
154 it('Should fail with a bad count pagination', async function () {
155 await checkBadCountPagination(server.url, path, null, query)
156 })
157
158 it('Should fail with an incorrect sort', async function () {
159 await checkBadSortPagination(server.url, path, null, query)
160 })
161
162 it('Should success with the correct parameters', async function () {
163 await makeGetRequest({ url: server.url, path, query, statusCodeExpected: HttpStatusCode.OK_200 })
164 })
165 })
166
143 describe('When searching video channels', function () { 167 describe('When searching video channels', function () {
144 const path = '/api/v1/search/video-channels/' 168 const path = '/api/v1/search/video-channels/'
145 169
@@ -171,6 +195,7 @@ describe('Test videos API validator', function () {
171 195
172 const query = { search: 'coucou' } 196 const query = { search: 'coucou' }
173 const paths = [ 197 const paths = [
198 '/api/v1/search/video-playlists/',
174 '/api/v1/search/video-channels/', 199 '/api/v1/search/video-channels/',
175 '/api/v1/search/videos/' 200 '/api/v1/search/videos/'
176 ] 201 ]