+ const customQuery1 = { ...query, startDate: 'hello' }
+ await makeGetRequest({ url: server.url, path, query: customQuery1, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+
+ const customQuery2 = { ...query, endDate: 'hello' }
+ await makeGetRequest({ url: server.url, path, query: customQuery2, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+
+ const customQuery3 = { ...query, originallyPublishedStartDate: 'hello' }
+ await makeGetRequest({ url: server.url, path, query: customQuery3, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+
+ const customQuery4 = { ...query, originallyPublishedEndDate: 'hello' }
+ await makeGetRequest({ url: server.url, path, query: customQuery4, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+ })
+
+ it('Should fail with an invalid host', async function () {
+ const customQuery = { ...query, host: '6565' }
+ await makeGetRequest({ url: server.url, path, query: customQuery, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+ })
+
+ it('Should succeed with a host', async function () {
+ const customQuery = { ...query, host: 'example.com' }
+ await makeGetRequest({ url: server.url, path, query: customQuery, expectedStatus: HttpStatusCode.OK_200 })
+ })
+
+ it('Should fail with invalid uuids', async function () {
+ const customQuery = { ...query, uuids: [ '6565', 'dfd70b83-639f-4980-94af-304a56ab4b35' ] }
+ await makeGetRequest({ url: server.url, path, query: customQuery, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+ })
+
+ it('Should succeed with valid uuids', async function () {
+ const customQuery = { ...query, uuids: [ 'dfd70b83-639f-4980-94af-304a56ab4b35' ] }
+ await makeGetRequest({ url: server.url, path, query: customQuery, expectedStatus: HttpStatusCode.OK_200 })
+ })
+ })
+
+ describe('When searching video playlists', function () {
+ const path = '/api/v1/search/video-playlists/'
+
+ const query = {
+ search: 'coucou',
+ host: 'example.com'
+ }
+
+ 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)
+ })