From 0aa52e170727ac6bdf441bcaa2353ae0b8a354ed Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 18 Nov 2020 15:29:38 +0100 Subject: Add ability to display all channel/account videos --- server/tests/api/check-params/videos-filter.ts | 29 +++++++++++++++----------- 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'server/tests/api/check-params') diff --git a/server/tests/api/check-params/videos-filter.ts b/server/tests/api/check-params/videos-filter.ts index ec8654db2..bf8248b0e 100644 --- a/server/tests/api/check-params/videos-filter.ts +++ b/server/tests/api/check-params/videos-filter.ts @@ -78,28 +78,33 @@ describe('Test videos filters', function () { await testEndpoints(server, server.accessToken, 'local', 200) }) - it('Should fail to list all-local with a simple user', async function () { + it('Should fail to list all-local/all with a simple user', async function () { await testEndpoints(server, userAccessToken, 'all-local', 401) + await testEndpoints(server, userAccessToken, 'all', 401) }) - it('Should succeed to list all-local with a moderator', async function () { + it('Should succeed to list all-local/all with a moderator', async function () { await testEndpoints(server, moderatorAccessToken, 'all-local', 200) + await testEndpoints(server, moderatorAccessToken, 'all', 200) }) - it('Should succeed to list all-local with an admin', async function () { + it('Should succeed to list all-local/all with an admin', async function () { await testEndpoints(server, server.accessToken, 'all-local', 200) + await testEndpoints(server, server.accessToken, 'all', 200) }) // Because we cannot authenticate the user on the RSS endpoint - it('Should fail on the feeds endpoint with the all-local filter', async function () { - await makeGetRequest({ - url: server.url, - path: '/feeds/videos.json', - statusCodeExpected: 401, - query: { - filter: 'all-local' - } - }) + it('Should fail on the feeds endpoint with the all-local/all filter', async function () { + for (const filter of [ 'all', 'all-local' ]) { + await makeGetRequest({ + url: server.url, + path: '/feeds/videos.json', + statusCodeExpected: 401, + query: { + filter + } + }) + } }) it('Should succeed on the feeds endpoint with the local filter', async function () { -- cgit v1.2.3