aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-27 10:15:55 +0200
committerChocobozzz <me@florianbigard.com>2021-08-27 10:15:55 +0200
commit8f581725651c4b2c213d75fc028e306bbf239d3e (patch)
tree8deb842327c2a227d8e302d9a84bd9f8f9f7affa /server/tests/api/check-params/users.ts
parent1ff15061b31245df4248e47228d0a90b07ab3f01 (diff)
downloadPeerTube-8f581725651c4b2c213d75fc028e306bbf239d3e.tar.gz
PeerTube-8f581725651c4b2c213d75fc028e306bbf239d3e.tar.zst
PeerTube-8f581725651c4b2c213d75fc028e306bbf239d3e.zip
Allow accounts to skip account setup modal
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r--server/tests/api/check-params/users.ts27
1 files changed, 14 insertions, 13 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index 9d8f933db..58b360f92 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -491,20 +491,20 @@ describe('Test users API validators', function () {
491 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userToken, fields }) 491 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userToken, fields })
492 }) 492 })
493 493
494 it('Should fail with an invalid noInstanceConfigWarningModal attribute', async function () { 494 it('Should fail with invalid no modal attributes', async function () {
495 const fields = { 495 const keys = [
496 noInstanceConfigWarningModal: -1 496 'noInstanceConfigWarningModal',
497 } 497 'noAccountSetupWarningModal',
498 498 'noWelcomeModal'
499 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userToken, fields }) 499 ]
500 }) 500
501 for (const key of keys) {
502 const fields = {
503 [key]: -1
504 }
501 505
502 it('Should fail with an invalid noWelcomeModal attribute', async function () { 506 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userToken, fields })
503 const fields = {
504 noWelcomeModal: -1
505 } 507 }
506
507 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userToken, fields })
508 }) 508 })
509 509
510 it('Should succeed to change password with the correct params', async function () { 510 it('Should succeed to change password with the correct params', async function () {
@@ -516,7 +516,8 @@ describe('Test users API validators', function () {
516 email: 'super_email@example.com', 516 email: 'super_email@example.com',
517 theme: 'default', 517 theme: 'default',
518 noInstanceConfigWarningModal: true, 518 noInstanceConfigWarningModal: true,
519 noWelcomeModal: true 519 noWelcomeModal: true,
520 noAccountSetupWarningModal: true
520 } 521 }
521 522
522 await makePutBodyRequest({ 523 await makePutBodyRequest({