aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r--server/tests/api/check-params/blocklist.ts20
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,