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/users.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/server/tests/api/check-params/users.js b/server/tests/api/check-params/users.js
index b04f9f4a6..4a176e6c2 100644
--- a/server/tests/api/check-params/users.js
+++ b/server/tests/api/check-params/users.js
@@ -270,6 +270,14 @@ describe('Test users API validators', function () {
270 requestsUtils.makePutBodyRequest(server.url, path + userId, userAccessToken, data, done) 270 requestsUtils.makePutBodyRequest(server.url, path + userId, userAccessToken, data, done)
271 }) 271 })
272 272
273 it('Should fail with an invalid display NSFW attribute', function (done) {
274 const data = {
275 displayNSFW: -1
276 }
277
278 requestsUtils.makePutBodyRequest(server.url, path + userId, userAccessToken, data, done)
279 })
280
273 it('Should fail with an non authenticated user', function (done) { 281 it('Should fail with an non authenticated user', function (done) {
274 const data = { 282 const data = {
275 password: 'my super password' 283 password: 'my super password'
@@ -280,7 +288,8 @@ describe('Test users API validators', function () {
280 288
281 it('Should succeed with the correct params', function (done) { 289 it('Should succeed with the correct params', function (done) {
282 const data = { 290 const data = {
283 password: 'my super password' 291 password: 'my super password',
292 displayNSFW: true
284 } 293 }
285 294
286 requestsUtils.makePutBodyRequest(server.url, path + userId, userAccessToken, data, done, 204) 295 requestsUtils.makePutBodyRequest(server.url, path + userId, userAccessToken, data, done, 204)