aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-19 10:37:35 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commit9b474844e85cce916370693cc24f53339a695570 (patch)
tree10b1148a7581a2754e336a144c085a05ce72a1db /server/tests/api/check-params/users.ts
parent32fe00138990627749da58ff9f845584013aa219 (diff)
downloadPeerTube-9b474844e85cce916370693cc24f53339a695570.tar.gz
PeerTube-9b474844e85cce916370693cc24f53339a695570.tar.zst
PeerTube-9b474844e85cce916370693cc24f53339a695570.zip
Add CLI plugins tests
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-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 })