diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-12 17:26:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-16 16:41:36 +0200 |
commit | af5767ffae41b2d5604e41ba9a7225c623dd6735 (patch) | |
tree | b96787bd134fe04d3d042795636df4bf17b5991f /server/tests/api/check-params | |
parent | 7ad9b9846c44d198a736183fb186c2039f5236b5 (diff) | |
download | PeerTube-af5767ffae41b2d5604e41ba9a7225c623dd6735.tar.gz PeerTube-af5767ffae41b2d5604e41ba9a7225c623dd6735.tar.zst PeerTube-af5767ffae41b2d5604e41ba9a7225c623dd6735.zip |
Add user/instance block by users in the client
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r-- | server/tests/api/check-params/blocklist.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/server/tests/api/check-params/blocklist.ts b/server/tests/api/check-params/blocklist.ts index 8117c46a6..d24d9323f 100644 --- a/server/tests/api/check-params/blocklist.ts +++ b/server/tests/api/check-params/blocklist.ts | |||
@@ -85,6 +85,16 @@ describe('Test blocklist API validators', function () { | |||
85 | }) | 85 | }) |
86 | }) | 86 | }) |
87 | 87 | ||
88 | it('Should fail to block ourselves', async function () { | ||
89 | await makePostBodyRequest({ | ||
90 | url: server.url, | ||
91 | token: server.accessToken, | ||
92 | path, | ||
93 | fields: { accountName: 'root' }, | ||
94 | statusCodeExpected: 409 | ||
95 | }) | ||
96 | }) | ||
97 | |||
88 | it('Should succeed with the correct params', async function () { | 98 | it('Should succeed with the correct params', async function () { |
89 | await makePostBodyRequest({ | 99 | await makePostBodyRequest({ |
90 | url: server.url, | 100 | url: server.url, |
@@ -170,6 +180,16 @@ describe('Test blocklist API validators', function () { | |||
170 | }) | 180 | }) |
171 | }) | 181 | }) |
172 | 182 | ||
183 | it('Should fail with our own server', async function () { | ||
184 | await makePostBodyRequest({ | ||
185 | url: server.url, | ||
186 | token: server.accessToken, | ||
187 | path, | ||
188 | fields: { host: 'localhost:9001' }, | ||
189 | statusCodeExpected: 409 | ||
190 | }) | ||
191 | }) | ||
192 | |||
173 | it('Should succeed with the correct params', async function () { | 193 | it('Should succeed with the correct params', async function () { |
174 | await makePostBodyRequest({ | 194 | await makePostBodyRequest({ |
175 | url: server.url, | 195 | url: server.url, |