Stop using deprecated developer/login route in tests

This commit is contained in:
Johannes Zellner
2021-04-20 17:52:53 +02:00
parent 727e6720e8
commit d74f2b8506

View File

@@ -697,7 +697,7 @@ describe('External LDAP', function () {
email: 'auto0@login.com'
});
superagent.post(SERVER_URL + '/api/v1/developer/login')
superagent.post(SERVER_URL + '/api/v1/cloudron/login')
.send({ username: 'autologinuser0', password: LDAP_SHARED_PASSWORD })
.end(function (error, result) {
expect(result.statusCode).to.equal(401);
@@ -722,7 +722,7 @@ describe('External LDAP', function () {
});
it('fails for unknown user', function (done) {
superagent.post(SERVER_URL + '/api/v1/developer/login')
superagent.post(SERVER_URL + '/api/v1/cloudron/login')
.send({ username: 'doesnotexist', password: LDAP_SHARED_PASSWORD })
.end(function (error, result) {
expect(result.statusCode).to.equal(401);
@@ -746,7 +746,7 @@ describe('External LDAP', function () {
email: 'auto1@login.com'
});
superagent.post(SERVER_URL + '/api/v1/developer/login')
superagent.post(SERVER_URL + '/api/v1/cloudron/login')
.send({ username: 'autologinuser1', password: 'wrongpassword' })
.end(function (error, result) {
expect(result.statusCode).to.equal(401);
@@ -770,7 +770,7 @@ describe('External LDAP', function () {
email: 'auto2@login.com'
});
superagent.post(SERVER_URL + '/api/v1/developer/login')
superagent.post(SERVER_URL + '/api/v1/cloudron/login')
.send({ username: 'autologinuser2', password: LDAP_SHARED_PASSWORD })
.end(function (error, result) {
expect(result.statusCode).to.equal(200);