]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/users.ts
Fix transaction retryer error log
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / users.ts
index dba57778de4491257a89cf3f837bdf48444f62e9..f36146c538c8bdac0f01cdc42139e958bfa41da5 100644 (file)
@@ -179,6 +179,18 @@ describe('Test users API validators', function () {
       await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
     })
 
+    it('Should fail with a "peertube" username', async function () {
+      const fields = immutableAssign(baseCorrectParams, { username: 'peertube' })
+
+      await makePostBodyRequest({
+        url: server.url,
+        path,
+        token: server.accessToken,
+        fields,
+        statusCodeExpected: 409
+      })
+    })
+
     it('Should succeed with the correct params', async function () {
       await makePostBodyRequest({
         url: server.url,
@@ -493,6 +505,18 @@ describe('Test users API validators', function () {
       })
     })
 
+    it('Should fail with a "peertube" username', async function () {
+      const fields = immutableAssign(baseCorrectParams, { username: 'peertube' })
+
+      await makePostBodyRequest({
+        url: server.url,
+        path: registrationPath,
+        token: server.accessToken,
+        fields,
+        statusCodeExpected: 409
+      })
+    })
+
     it('Should fail if we register a user with the same email', async function () {
       const fields = immutableAssign(baseCorrectParams, { email: 'admin1@example.com' })