diff options
Diffstat (limited to 'webapp/tests/client_user.test.jsx')
-rw-r--r-- | webapp/tests/client_user.test.jsx | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/webapp/tests/client_user.test.jsx b/webapp/tests/client_user.test.jsx index 2b3b1b89a..b4f10be12 100644 --- a/webapp/tests/client_user.test.jsx +++ b/webapp/tests/client_user.test.jsx @@ -1,13 +1,6 @@ // Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -/* eslint-disable no-console */ -/* eslint-disable global-require */ -/* eslint-disable func-names */ -/* eslint-disable prefer-arrow-callback */ -/* eslint-disable no-magic-numbers */ -/* eslint-disable no-unreachable */ - import assert from 'assert'; import TestHelper from './test_helper.jsx'; @@ -113,7 +106,6 @@ describe('Client.User', function() { 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, @@ -122,13 +114,13 @@ describe('Client.User', function() { user.username, user.password, null, - function() { - done(new Error()); + function(data) { + assert.equal(data.id.length > 0, true); + assert.equal(data.email, user.email); + done(); }, function(err) { - // 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(); + done(new Error(err.message)); } ); }, @@ -329,8 +321,7 @@ describe('Client.User', function() { function() { throw Error('shouldnt work'); }, - function(err) { - assert.equal(err.id, 'ent.ldap.do_login.licence_disable.app_error'); + function() { done(); } ); @@ -555,8 +546,7 @@ describe('Client.User', function() { function() { done(new Error('not enabled')); }, - function(err) { - assert.equal(err.id, 'ent.mfa.license_disable.app_error'); + function() { done(); } ); |