aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/search.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/search.ts')
-rw-r--r--server/tests/api/check-params/search.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/tests/api/check-params/search.ts b/server/tests/api/check-params/search.ts
index 72ad6c842..789ea7754 100644
--- a/server/tests/api/check-params/search.ts
+++ b/server/tests/api/check-params/search.ts
@@ -146,6 +146,16 @@ describe('Test videos API validator', function () {
146 const customQuery = { ...query, host: 'example.com' } 146 const customQuery = { ...query, host: 'example.com' }
147 await makeGetRequest({ url: server.url, path, query: customQuery, expectedStatus: HttpStatusCode.OK_200 }) 147 await makeGetRequest({ url: server.url, path, query: customQuery, expectedStatus: HttpStatusCode.OK_200 })
148 }) 148 })
149
150 it('Should fail with invalid uuids', async function () {
151 const customQuery = { ...query, uuids: [ '6565', 'dfd70b83-639f-4980-94af-304a56ab4b35' ] }
152 await makeGetRequest({ url: server.url, path, query: customQuery, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
153 })
154
155 it('Should succeed with valid uuids', async function () {
156 const customQuery = { ...query, uuids: [ 'dfd70b83-639f-4980-94af-304a56ab4b35' ] }
157 await makeGetRequest({ url: server.url, path, query: customQuery, expectedStatus: HttpStatusCode.OK_200 })
158 })
149 }) 159 })
150 160
151 describe('When searching video playlists', function () { 161 describe('When searching video playlists', function () {
@@ -172,6 +182,11 @@ describe('Test videos API validator', function () {
172 await makeGetRequest({ url: server.url, path, query: { ...query, host: '6565' }, expectedStatus: HttpStatusCode.BAD_REQUEST_400 }) 182 await makeGetRequest({ url: server.url, path, query: { ...query, host: '6565' }, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
173 }) 183 })
174 184
185 it('Should fail with invalid uuids', async function () {
186 const customQuery = { ...query, uuids: [ '6565', 'dfd70b83-639f-4980-94af-304a56ab4b35' ] }
187 await makeGetRequest({ url: server.url, path, query: customQuery, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
188 })
189
175 it('Should succeed with the correct parameters', async function () { 190 it('Should succeed with the correct parameters', async function () {
176 await makeGetRequest({ url: server.url, path, query, expectedStatus: HttpStatusCode.OK_200 }) 191 await makeGetRequest({ url: server.url, path, query, expectedStatus: HttpStatusCode.OK_200 })
177 }) 192 })