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.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',