diff options
Diffstat (limited to 'server/tests/api/check-params.js')
-rw-r--r-- | server/tests/api/check-params.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/tests/api/check-params.js b/server/tests/api/check-params.js index 4f7b26561..e361147bb 100644 --- a/server/tests/api/check-params.js +++ b/server/tests/api/check-params.js | |||
@@ -590,6 +590,17 @@ describe('Test parameters validator', function () { | |||
590 | requestsUtils.makePostBodyRequest(server.url, path, server.accessToken, data, done, 204) | 590 | requestsUtils.makePostBodyRequest(server.url, path, server.accessToken, data, done, 204) |
591 | }) | 591 | }) |
592 | 592 | ||
593 | it('Should fail if we add a user with the same username', function (done) { | ||
594 | it('Should succeed with the correct params', function (done) { | ||
595 | const data = { | ||
596 | username: 'user1', | ||
597 | password: 'my super password' | ||
598 | } | ||
599 | |||
600 | requestsUtils.makePostBodyRequest(server.url, path, server.accessToken, data, done, 409) | ||
601 | }) | ||
602 | }) | ||
603 | |||
593 | it('Should fail with a non admin user', function (done) { | 604 | it('Should fail with a non admin user', function (done) { |
594 | server.user = { | 605 | server.user = { |
595 | username: 'user1', | 606 | username: 'user1', |