]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params.js
Client: fix error display for component
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params.js
index 4f7b26561d7354b9a40084f07ee71c0c59459a7f..e361147bbd5c32a421e3c220765da5f50e482d36 100644 (file)
@@ -590,6 +590,17 @@ describe('Test parameters validator', function () {
         requestsUtils.makePostBodyRequest(server.url, path, server.accessToken, data, done, 204)
       })
 
+      it('Should fail if we add a user with the same username', function (done) {
+        it('Should succeed with the correct params', function (done) {
+          const data = {
+            username: 'user1',
+            password: 'my super password'
+          }
+
+          requestsUtils.makePostBodyRequest(server.url, path, server.accessToken, data, done, 409)
+        })
+      })
+
       it('Should fail with a non admin user', function (done) {
         server.user = {
           username: 'user1',