aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r--server/tests/api/check-params/users.ts13
1 files changed, 12 insertions, 1 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index 5d62fe2b3..5b788e328 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -387,13 +387,24 @@ describe('Test users API validators', function () {
387 } 387 }
388 }) 388 })
389 389
390 it('Should fail with an invalid theme', async function () {
391 const fields = { theme: 'invalid' }
392 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
393 })
394
395 it('Should fail with an unknown theme', async function () {
396 const fields = { theme: 'peertube-theme-unknown' }
397 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
398 })
399
390 it('Should succeed to change password with the correct params', async function () { 400 it('Should succeed to change password with the correct params', async function () {
391 const fields = { 401 const fields = {
392 currentPassword: 'my super password', 402 currentPassword: 'my super password',
393 password: 'my super password', 403 password: 'my super password',
394 nsfwPolicy: 'blur', 404 nsfwPolicy: 'blur',
395 autoPlayVideo: false, 405 autoPlayVideo: false,
396 email: 'super_email@example.com' 406 email: 'super_email@example.com',
407 theme: 'default'
397 } 408 }
398 409
399 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields, statusCodeExpected: 204 }) 410 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields, statusCodeExpected: 204 })