aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-04-03 21:24:36 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-04-03 21:24:36 +0200
commit1d49e1e27d63db1dfc9a7fd28c9902f488831a89 (patch)
treece3353ad691876c55ce8fcfdd70bfa2b9112b39a /server/tests/api/check-params
parent31b59b477459d4f26ed8ef089a0e5553fb6a332b (diff)
downloadPeerTube-1d49e1e27d63db1dfc9a7fd28c9902f488831a89.tar.gz
PeerTube-1d49e1e27d63db1dfc9a7fd28c9902f488831a89.tar.zst
PeerTube-1d49e1e27d63db1dfc9a7fd28c9902f488831a89.zip
Server: Add NSFW in user profile
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)