X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=inline;f=server%2Ftests%2Fapi%2Fcheck-params%2Ffollows.ts;h=be2a603a3ad420f3ff511e9902374e8bd818cc39;hb=97ecddae104f4013d261f0e9645e8b319ff0f1a6;hp=488666a754c814c25cd838118db70e8bb995665c;hpb=f5b72c3937c721258c569ee783503adb379c42ab;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/follows.ts b/server/tests/api/check-params/follows.ts index 488666a75..be2a603a3 100644 --- a/server/tests/api/check-params/follows.ts +++ b/server/tests/api/check-params/follows.ts @@ -142,13 +142,24 @@ describe('Test server follows API validators', function () { }) }) + it('Should fail with an incorrect actor type', async function () { + await makeGetRequest({ + url: server.url, + path, + query: { + actorType: 'blabla' + } + }) + }) + it('Should fail succeed with the correct params', async function () { await makeGetRequest({ url: server.url, path, statusCodeExpected: 200, query: { - state: 'accepted' + state: 'accepted', + actorType: 'Application' } }) }) @@ -169,12 +180,23 @@ describe('Test server follows API validators', function () { await checkBadSortPagination(server.url, path) }) + it('Should fail with an incorrect actor type', async function () { + await makeGetRequest({ + url: server.url, + path, + query: { + actorType: 'blabla' + } + }) + }) + it('Should fail with an incorrect state', async function () { await makeGetRequest({ url: server.url, path, query: { - state: 'blabla' + state: 'blabla', + actorType: 'Application' } }) })