aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/video-abuses.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/video-abuses.ts')
-rw-r--r--server/tests/api/check-params/video-abuses.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/server/tests/api/check-params/video-abuses.ts b/server/tests/api/check-params/video-abuses.ts
index bea2177f3..e643cb95e 100644
--- a/server/tests/api/check-params/video-abuses.ts
+++ b/server/tests/api/check-params/video-abuses.ts
@@ -76,6 +76,22 @@ describe('Test video abuses API validators', function () {
76 statusCodeExpected: 403 76 statusCodeExpected: 403
77 }) 77 })
78 }) 78 })
79
80 it('Should fail with a bad id filter', async function () {
81 await makeGetRequest({ url: server.url, path, token: server.accessToken, query: { id: 'toto' } })
82 })
83
84 it('Should fail with a bad state filter', async function () {
85 await makeGetRequest({ url: server.url, path, token: server.accessToken, query: { state: 'toto' } })
86 })
87
88 it('Should fail with a bad videoIs filter', async function () {
89 await makeGetRequest({ url: server.url, path, token: server.accessToken, query: { videoIs: 'toto' } })
90 })
91
92 it('Should succeed with the correct params', async function () {
93 await makeGetRequest({ url: server.url, path, token: server.accessToken, query: { id: 13 }, statusCodeExpected: 200 })
94 })
79 }) 95 })
80 96
81 describe('When reporting a video abuse', function () { 97 describe('When reporting a video abuse', function () {