From 37a44fc915eef2140e22ceb96aba6b6eb2509007 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 17 Jun 2021 16:02:38 +0200 Subject: Add ability to search playlists --- server/tests/api/check-params/search.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'server/tests/api/check-params/search.ts') 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 () { }) }) + describe('When searching video playlists', function () { + const path = '/api/v1/search/video-playlists/' + + const query = { + search: 'coucou' + } + + it('Should fail with a bad start pagination', async function () { + await checkBadStartPagination(server.url, path, null, query) + }) + + it('Should fail with a bad count pagination', async function () { + await checkBadCountPagination(server.url, path, null, query) + }) + + it('Should fail with an incorrect sort', async function () { + await checkBadSortPagination(server.url, path, null, query) + }) + + it('Should success with the correct parameters', async function () { + await makeGetRequest({ url: server.url, path, query, statusCodeExpected: HttpStatusCode.OK_200 }) + }) + }) + describe('When searching video channels', function () { const path = '/api/v1/search/video-channels/' @@ -171,6 +195,7 @@ describe('Test videos API validator', function () { const query = { search: 'coucou' } const paths = [ + '/api/v1/search/video-playlists/', '/api/v1/search/video-channels/', '/api/v1/search/videos/' ] -- cgit v1.2.3