]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/users.ts
Multi step registration
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / users.ts
index d26032ea5139cf5472ed08a1b205d0e41aa95fa3..95097817b21dd5134370f353cded7f65f4b005a1 100644 (file)
@@ -737,6 +737,13 @@ describe('Test users API validators', function () {
       await makePostBodyRequest({ url: server.url, path: registrationPath, token: server.accessToken, fields })
     })
 
+    it('Should fail with a channel name that is the same than user username', async function () {
+      const source = { username: 'super_user', channel: { name: 'super_user', displayName: 'display name' } }
+      const fields = immutableAssign(baseCorrectParams, source)
+
+      await makePostBodyRequest({ url: server.url, path: registrationPath, token: server.accessToken, fields })
+    })
+
     it('Should fail with an existing channel', async function () {
       const videoChannelAttributesArg = { name: 'existing_channel', displayName: 'hello', description: 'super description' }
       await addVideoChannel(server.url, server.accessToken, videoChannelAttributesArg)