aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/users.ts
diff options
context:
space:
mode:
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 })