aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-06-07 16:59:53 +0200
committerChocobozzz <me@florianbigard.com>2019-06-07 17:05:42 +0200
commit1f20622f2b087eaf8738d60fae00a44b9c558ca3 (patch)
tree1c8554623665ca96b8a1e6f2a6bcb8c1b5a83c2e /server/tests/api/check-params
parent1a03bea0c42fa1064ce4770157b4fd2e3edd5565 (diff)
downloadPeerTube-1f20622f2b087eaf8738d60fae00a44b9c558ca3.tar.gz
PeerTube-1f20622f2b087eaf8738d60fae00a44b9c558ca3.tar.zst
PeerTube-1f20622f2b087eaf8738d60fae00a44b9c558ca3.zip
Improve registration
* Add ability to set the user display name * Use display name to guess the username/channel name * Add explanations about what is the purpose of a username/channel name * Add a loader at the "done" step
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r--server/tests/api/check-params/users.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index 95097817b..3268f8c90 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -643,6 +643,7 @@ describe('Test users API validators', function () {
643 const registrationPath = path + '/register' 643 const registrationPath = path + '/register'
644 const baseCorrectParams = { 644 const baseCorrectParams = {
645 username: 'user3', 645 username: 'user3',
646 displayName: 'super user',
646 email: 'test3@example.com', 647 email: 'test3@example.com',
647 password: 'my super password' 648 password: 'my super password'
648 } 649 }
@@ -725,6 +726,12 @@ describe('Test users API validators', function () {
725 }) 726 })
726 }) 727 })
727 728
729 it('Should fail with a bad display name', async function () {
730 const fields = immutableAssign(baseCorrectParams, { displayName: 'a'.repeat(150) })
731
732 await makePostBodyRequest({ url: server.url, path: registrationPath, token: server.accessToken, fields })
733 })
734
728 it('Should fail with a bad channel name', async function () { 735 it('Should fail with a bad channel name', async function () {
729 const fields = immutableAssign(baseCorrectParams, { channel: { name: '[]azf', displayName: 'toto' } }) 736 const fields = immutableAssign(baseCorrectParams, { channel: { name: '[]azf', displayName: 'toto' } })
730 737