summaryrefslogtreecommitdiffstats
path: root/webapp/tests/client_user.test.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/tests/client_user.test.jsx')
-rw-r--r--webapp/tests/client_user.test.jsx19
1 files changed, 9 insertions, 10 deletions
diff --git a/webapp/tests/client_user.test.jsx b/webapp/tests/client_user.test.jsx
index e0ead2de9..7835a38bf 100644
--- a/webapp/tests/client_user.test.jsx
+++ b/webapp/tests/client_user.test.jsx
@@ -66,7 +66,6 @@ describe('Client.User', function() {
function() {
client.login(
user.email,
- null,
user.password,
null,
function(data) {
@@ -85,15 +84,15 @@ describe('Client.User', function() {
);
});
- it('loginByUsername', function(done) {
+ it('loginById', function(done) {
var client = TestHelper.createClient();
var user = TestHelper.fakeUser();
client.createUser(
user,
- function() {
- client.login(
- null,
- user.username,
+ function(newUser) {
+ assert.equal(user.email, newUser.email);
+ client.loginById(
+ newUser.id,
user.password,
null,
function(data) {
@@ -112,14 +111,14 @@ describe('Client.User', function() {
);
});
- it('loginByLdap', function(done) {
+ it('loginByUsername', function(done) {
var client = TestHelper.createClient();
client.enableLogErrorsToConsole(false); // Disabling since this unit test causes an error
var user = TestHelper.fakeUser();
client.createUser(
user,
function() {
- client.loginByLdap(
+ client.login(
user.username,
user.password,
null,
@@ -127,7 +126,8 @@ describe('Client.User', function() {
done(new Error());
},
function(err) {
- assert.equal(err.id, 'api.user.login_ldap.disabled.app_error');
+ // should error out because logging in by username is disabled by default
+ assert.equal(err.id, 'store.sql_user.get_for_login.app_error');
done();
}
);
@@ -372,7 +372,6 @@ describe('Client.User', function() {
it('checkMfa', function(done) {
TestHelper.initBasic(() => {
TestHelper.basicClient().checkMfa(
- 'email',
TestHelper.generateId(),
function(data) {
assert.equal(data.mfa_required, 'false');