diff options
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r-- | server/tests/api/check-params/users.ts | 27 |
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({ |