diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-19 09:44:43 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-20 09:25:44 +0200 |
commit | 4beda9e12adc7b1f3b178cecd6863ebf3cf431f1 (patch) | |
tree | 6244a10b286d66c6dcd7799aee630670d0493781 /server/tests/api/check-params/users.ts | |
parent | 9593a78ae1368a9ad8bb11044fce6fde2892701a (diff) | |
download | PeerTube-4beda9e12adc7b1f3b178cecd6863ebf3cf431f1.tar.gz PeerTube-4beda9e12adc7b1f3b178cecd6863ebf3cf431f1.tar.zst PeerTube-4beda9e12adc7b1f3b178cecd6863ebf3cf431f1.zip |
Add ability to view my followers
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r-- | server/tests/api/check-params/users.ts | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index 58b360f92..517e2f423 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts | |||
@@ -840,6 +840,34 @@ describe('Test users API validators', function () { | |||
840 | }) | 840 | }) |
841 | }) | 841 | }) |
842 | 842 | ||
843 | describe('When getting my global followers', function () { | ||
844 | const path = '/api/v1/accounts/user1/followers' | ||
845 | |||
846 | it('Should fail with a bad start pagination', async function () { | ||
847 | await checkBadStartPagination(server.url, path, userToken) | ||
848 | }) | ||
849 | |||
850 | it('Should fail with a bad count pagination', async function () { | ||
851 | await checkBadCountPagination(server.url, path, userToken) | ||
852 | }) | ||
853 | |||
854 | it('Should fail with an incorrect sort', async function () { | ||
855 | await checkBadSortPagination(server.url, path, userToken) | ||
856 | }) | ||
857 | |||
858 | it('Should fail with a unauthenticated user', async function () { | ||
859 | await makeGetRequest({ url: server.url, path, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 }) | ||
860 | }) | ||
861 | |||
862 | it('Should fail with a another user', async function () { | ||
863 | await makeGetRequest({ url: server.url, path, token: server.accessToken, expectedStatus: HttpStatusCode.FORBIDDEN_403 }) | ||
864 | }) | ||
865 | |||
866 | it('Should succeed with the correct params', async function () { | ||
867 | await makeGetRequest({ url: server.url, path, token: userToken, expectedStatus: HttpStatusCode.OK_200 }) | ||
868 | }) | ||
869 | }) | ||
870 | |||
843 | describe('When blocking/unblocking/removing user', function () { | 871 | describe('When blocking/unblocking/removing user', function () { |
844 | 872 | ||
845 | it('Should fail with an incorrect id', async function () { | 873 | it('Should fail with an incorrect id', async function () { |