aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-11-28 11:37:32 +0100
committerChocobozzz <me@florianbigard.com>2019-11-28 11:37:32 +0100
commitb8f4167fb6fa448125aeecff80b201d74e27fe6a (patch)
tree33179fe38e113b3bd88bae9782f4741754a85159 /server/tests/api/check-params
parentd275e75453015352d5b9387eaf5078e1ba5e0ea2 (diff)
downloadPeerTube-b8f4167fb6fa448125aeecff80b201d74e27fe6a.tar.gz
PeerTube-b8f4167fb6fa448125aeecff80b201d74e27fe6a.tar.zst
PeerTube-b8f4167fb6fa448125aeecff80b201d74e27fe6a.zip
Only display accepted followers/followings in about page
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r--server/tests/api/check-params/follows.ts44
1 files changed, 43 insertions, 1 deletions
diff --git a/server/tests/api/check-params/follows.ts b/server/tests/api/check-params/follows.ts
index 2eb54cb0a..488666a75 100644
--- a/server/tests/api/check-params/follows.ts
+++ b/server/tests/api/check-params/follows.ts
@@ -6,7 +6,7 @@ import {
6 cleanupTests, 6 cleanupTests,
7 createUser, 7 createUser,
8 flushAndRunServer, 8 flushAndRunServer,
9 makeDeleteRequest, 9 makeDeleteRequest, makeGetRequest,
10 makePostBodyRequest, 10 makePostBodyRequest,
11 ServerInfo, 11 ServerInfo,
12 setAccessTokensToServers, 12 setAccessTokensToServers,
@@ -131,6 +131,27 @@ describe('Test server follows API validators', function () {
131 it('Should fail with an incorrect sort', async function () { 131 it('Should fail with an incorrect sort', async function () {
132 await checkBadSortPagination(server.url, path) 132 await checkBadSortPagination(server.url, path)
133 }) 133 })
134
135 it('Should fail with an incorrect state', async function () {
136 await makeGetRequest({
137 url: server.url,
138 path,
139 query: {
140 state: 'blabla'
141 }
142 })
143 })
144
145 it('Should fail succeed with the correct params', async function () {
146 await makeGetRequest({
147 url: server.url,
148 path,
149 statusCodeExpected: 200,
150 query: {
151 state: 'accepted'
152 }
153 })
154 })
134 }) 155 })
135 156
136 describe('When listing followers', function () { 157 describe('When listing followers', function () {
@@ -147,6 +168,27 @@ describe('Test server follows API validators', function () {
147 it('Should fail with an incorrect sort', async function () { 168 it('Should fail with an incorrect sort', async function () {
148 await checkBadSortPagination(server.url, path) 169 await checkBadSortPagination(server.url, path)
149 }) 170 })
171
172 it('Should fail with an incorrect state', async function () {
173 await makeGetRequest({
174 url: server.url,
175 path,
176 query: {
177 state: 'blabla'
178 }
179 })
180 })
181
182 it('Should fail succeed with the correct params', async function () {
183 await makeGetRequest({
184 url: server.url,
185 path,
186 statusCodeExpected: 200,
187 query: {
188 state: 'accepted'
189 }
190 })
191 })
150 }) 192 })
151 193
152 describe('When removing a follower', function () { 194 describe('When removing a follower', function () {