summaryrefslogtreecommitdiffstats
path: root/webapp/tests
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-05-12 07:44:06 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-05-12 07:44:06 -0400
commit2b1db2974a9bf0b801ba00c9a7c689cf92fe139d (patch)
tree0567b2343770db1393ddd4903d830cbd21a1408d /webapp/tests
parentd44067fb3031c53fddb5730df727126145ab1089 (diff)
downloadchat-2b1db2974a9bf0b801ba00c9a7c689cf92fe139d.tar.gz
chat-2b1db2974a9bf0b801ba00c9a7c689cf92fe139d.tar.bz2
chat-2b1db2974a9bf0b801ba00c9a7c689cf92fe139d.zip
Fixed loginByUsername unit test (#2975)
* Fixed loginByUsername unit test * Removed unused variable from WebClient login functions
Diffstat (limited to 'webapp/tests')
-rw-r--r--webapp/tests/client_user.test.jsx11
1 files changed, 5 insertions, 6 deletions
diff --git a/webapp/tests/client_user.test.jsx b/webapp/tests/client_user.test.jsx
index 2b3b1b89a..621be6c6a 100644
--- a/webapp/tests/client_user.test.jsx
+++ b/webapp/tests/client_user.test.jsx
@@ -113,7 +113,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 +121,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));
}
);
},