aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params')
-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 ]