aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-28 14:40:06 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-09-05 10:17:02 +0200
commit43d0ea7f4b88d52097172cc0c1831edd7e492503 (patch)
treed950f0a365bc1d7086992a686a06c335e14a9be9 /server/tests/api/check-params/users.ts
parentbc20aaed463b1fc6727a2a90a7d7c4a00b95142a (diff)
downloadPeerTube-43d0ea7f4b88d52097172cc0c1831edd7e492503.tar.gz
PeerTube-43d0ea7f4b88d52097172cc0c1831edd7e492503.tar.zst
PeerTube-43d0ea7f4b88d52097172cc0c1831edd7e492503.zip
Add welcome modal
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r--server/tests/api/check-params/users.ts20
1 files changed, 19 insertions, 1 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index 939b919ed..55094795c 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -476,6 +476,22 @@ describe('Test users API validators', function () {
476 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields }) 476 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
477 }) 477 })
478 478
479 it('Should fail with an invalid noInstanceConfigWarningModal attribute', async function () {
480 const fields = {
481 noInstanceConfigWarningModal: -1
482 }
483
484 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
485 })
486
487 it('Should fail with an invalid noWelcomeModal attribute', async function () {
488 const fields = {
489 noWelcomeModal: -1
490 }
491
492 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
493 })
494
479 it('Should succeed to change password with the correct params', async function () { 495 it('Should succeed to change password with the correct params', async function () {
480 const fields = { 496 const fields = {
481 currentPassword: 'my super password', 497 currentPassword: 'my super password',
@@ -483,7 +499,9 @@ describe('Test users API validators', function () {
483 nsfwPolicy: 'blur', 499 nsfwPolicy: 'blur',
484 autoPlayVideo: false, 500 autoPlayVideo: false,
485 email: 'super_email@example.com', 501 email: 'super_email@example.com',
486 theme: 'default' 502 theme: 'default',
503 noInstanceConfigWarningModal: true,
504 noWelcomeModal: true
487 } 505 }
488 506
489 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields, statusCodeExpected: 204 }) 507 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields, statusCodeExpected: 204 })