aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/video-blacklist.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/video-blacklist.ts')
-rw-r--r--server/tests/api/check-params/video-blacklist.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/server/tests/api/check-params/video-blacklist.ts b/server/tests/api/check-params/video-blacklist.ts
index b5d0e0778..2072df4b6 100644
--- a/server/tests/api/check-params/video-blacklist.ts
+++ b/server/tests/api/check-params/video-blacklist.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { HttpStatusCode } from '@shared/core-utils' 5import { HttpStatusCode } from '@shared/models'
6import { 6import {
7 BlacklistCommand, 7 BlacklistCommand,
8 checkBadCountPagination, 8 checkBadCountPagination,
@@ -88,7 +88,7 @@ describe('Test video blacklist API validators', function () {
88 it('Should fail with a non authenticated user', async function () { 88 it('Should fail with a non authenticated user', async function () {
89 const path = basePath + servers[0].store.video + '/blacklist' 89 const path = basePath + servers[0].store.video + '/blacklist'
90 const fields = {} 90 const fields = {}
91 await makePostBodyRequest({ url: servers[0].url, path, token: 'hello', fields, statusCodeExpected: HttpStatusCode.UNAUTHORIZED_401 }) 91 await makePostBodyRequest({ url: servers[0].url, path, token: 'hello', fields, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 })
92 }) 92 })
93 93
94 it('Should fail with a non admin user', async function () { 94 it('Should fail with a non admin user', async function () {
@@ -99,7 +99,7 @@ describe('Test video blacklist API validators', function () {
99 path, 99 path,
100 token: userAccessToken2, 100 token: userAccessToken2,
101 fields, 101 fields,
102 statusCodeExpected: HttpStatusCode.FORBIDDEN_403 102 expectedStatus: HttpStatusCode.FORBIDDEN_403
103 }) 103 })
104 }) 104 })
105 105
@@ -119,7 +119,7 @@ describe('Test video blacklist API validators', function () {
119 path, 119 path,
120 token: servers[0].accessToken, 120 token: servers[0].accessToken,
121 fields, 121 fields,
122 statusCodeExpected: HttpStatusCode.CONFLICT_409 122 expectedStatus: HttpStatusCode.CONFLICT_409
123 }) 123 })
124 }) 124 })
125 125
@@ -132,7 +132,7 @@ describe('Test video blacklist API validators', function () {
132 path, 132 path,
133 token: servers[0].accessToken, 133 token: servers[0].accessToken,
134 fields, 134 fields,
135 statusCodeExpected: HttpStatusCode.NO_CONTENT_204 135 expectedStatus: HttpStatusCode.NO_CONTENT_204
136 }) 136 })
137 }) 137 })
138 }) 138 })
@@ -154,14 +154,14 @@ describe('Test video blacklist API validators', function () {
154 path, 154 path,
155 token: servers[0].accessToken, 155 token: servers[0].accessToken,
156 fields, 156 fields,
157 statusCodeExpected: HttpStatusCode.NOT_FOUND_404 157 expectedStatus: HttpStatusCode.NOT_FOUND_404
158 }) 158 })
159 }) 159 })
160 160
161 it('Should fail with a non authenticated user', async function () { 161 it('Should fail with a non authenticated user', async function () {
162 const path = basePath + servers[0].store.video + '/blacklist' 162 const path = basePath + servers[0].store.video + '/blacklist'
163 const fields = {} 163 const fields = {}
164 await makePutBodyRequest({ url: servers[0].url, path, token: 'hello', fields, statusCodeExpected: HttpStatusCode.UNAUTHORIZED_401 }) 164 await makePutBodyRequest({ url: servers[0].url, path, token: 'hello', fields, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 })
165 }) 165 })
166 166
167 it('Should fail with a non admin user', async function () { 167 it('Should fail with a non admin user', async function () {
@@ -172,7 +172,7 @@ describe('Test video blacklist API validators', function () {
172 path, 172 path,
173 token: userAccessToken2, 173 token: userAccessToken2,
174 fields, 174 fields,
175 statusCodeExpected: HttpStatusCode.FORBIDDEN_403 175 expectedStatus: HttpStatusCode.FORBIDDEN_403
176 }) 176 })
177 }) 177 })
178 178
@@ -192,7 +192,7 @@ describe('Test video blacklist API validators', function () {
192 path, 192 path,
193 token: servers[0].accessToken, 193 token: servers[0].accessToken,
194 fields, 194 fields,
195 statusCodeExpected: HttpStatusCode.NO_CONTENT_204 195 expectedStatus: HttpStatusCode.NO_CONTENT_204
196 }) 196 })
197 }) 197 })
198 }) 198 })