X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Ffollows.ts;h=2c2224a452b848a972362b6d06505b76ee78ec47;hb=3b0bd70aa05ab82fa30fe67ed4899d44652c703a;hp=488666a754c814c25cd838118db70e8bb995665c;hpb=b8f4167fb6fa448125aeecff80b201d74e27fe6a;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..2c2224a45 100644 --- a/server/tests/api/check-params/follows.ts +++ b/server/tests/api/check-params/follows.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-unused-expression */ +/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import 'mocha' @@ -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' } }) })