aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-06-19 14:55:58 +0200
committerChocobozzz <me@florianbigard.com>2019-06-19 15:05:36 +0200
commit3caf77d3b11f2dbc12e52d665183d36604c1dab9 (patch)
tree53e08727d5f1dc8be2bd4f4a14dadc05f607a9fb /server/tests/api/check-params/users.ts
parentbbe078ba55be635b5fc92f8f6286c45792b9e7e5 (diff)
downloadPeerTube-3caf77d3b11f2dbc12e52d665183d36604c1dab9.tar.gz
PeerTube-3caf77d3b11f2dbc12e52d665183d36604c1dab9.tar.zst
PeerTube-3caf77d3b11f2dbc12e52d665183d36604c1dab9.zip
Add language filters in user preferences
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r--server/tests/api/check-params/users.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index 2316033a1..5d62fe2b3 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -364,6 +364,29 @@ describe('Test users API validators', function () {
364 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields }) 364 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
365 }) 365 })
366 366
367 it('Should fail with an invalid videoLanguages attribute', async function () {
368 {
369 const fields = {
370 videoLanguages: 'toto'
371 }
372
373 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
374 }
375
376 {
377 const languages = []
378 for (let i = 0; i < 1000; i++) {
379 languages.push('fr')
380 }
381
382 const fields = {
383 videoLanguages: languages
384 }
385
386 await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
387 }
388 })
389
367 it('Should succeed to change password with the correct params', async function () { 390 it('Should succeed to change password with the correct params', async function () {
368 const fields = { 391 const fields = {
369 currentPassword: 'my super password', 392 currentPassword: 'my super password',