X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fusers.js;h=9e7115da149a53bc5c465a3d71a83e0f9f736c1c;hb=291e8d3eed88fe714fb74ad897ac2c67347a85ff;hp=0aa9a4524a3a572d5631222a91d0cf368c990b74;hpb=2c2e90921646d223060e98d517fc8ac61c90eb9e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/users.js b/server/tests/api/check-params/users.js index 0aa9a4524..9e7115da1 100644 --- a/server/tests/api/check-params/users.js +++ b/server/tests/api/check-params/users.js @@ -23,7 +23,7 @@ describe('Test users API validators', function () { // --------------------------------------------------------------- before(function (done) { - this.timeout(20000) + this.timeout(120000) series([ function (next) { @@ -513,12 +513,19 @@ describe('Test users API validators', function () { password: 'my super password 4' } - requestsUtils.makePostBodyRequest(serverWithRegistrationDisabled.url, registrationPath, serverWithRegistrationDisabled.accessToken, data, done, 400) + requestsUtils.makePostBodyRequest(serverWithRegistrationDisabled.url, registrationPath, serverWithRegistrationDisabled.accessToken, data, done, 403) + }) + }) + + describe('When registering multiple users on a server with users limit', function () { + it('Should fail when after 3 registrations', function (done) { + usersUtils.registerUser(server.url, 'user42', 'super password', 403, done) }) }) after(function (done) { process.kill(-server.app.pid) + process.kill(-serverWithRegistrationDisabled.app.pid) // Keep the logs if the test failed if (this.ok) {