diff options
-rw-r--r-- | webapp/actions/user_actions.jsx | 1 | ||||
-rw-r--r-- | webapp/tests/client_channel.test.jsx | 43 | ||||
-rw-r--r-- | webapp/tests/client_user.test.jsx | 7 |
3 files changed, 16 insertions, 35 deletions
diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx index b666413d9..15626db2b 100644 --- a/webapp/actions/user_actions.jsx +++ b/webapp/actions/user_actions.jsx @@ -136,7 +136,6 @@ function populateDMChannelsWithProfiles(userIds) { const currentUserId = UserStore.getCurrentId(); for (let i = 0; i < userIds.length; i++) { - // TODO There's a race condition here for DM channels if those channels aren't loaded yet const channelName = getDirectChannelName(currentUserId, userIds[i]); const channel = ChannelStore.getByName(channelName); if (channel) { diff --git a/webapp/tests/client_channel.test.jsx b/webapp/tests/client_channel.test.jsx index 77f9f9653..02d014a1f 100644 --- a/webapp/tests/client_channel.test.jsx +++ b/webapp/tests/client_channel.test.jsx @@ -25,25 +25,16 @@ describe('Client.Channels', function() { }); }); - /* TODO: FIX THIS TEST it('createDirectChannel', function(done) { TestHelper.initBasic(() => { TestHelper.basicClient().createUser( TestHelper.fakeUser(), function(user2) { - TestHelper.basicClient().addUserToTeam( + TestHelper.basicClient().createDirectChannel( user2.id, - function() { - TestHelper.basicClient().createDirectChannel( - user2.id, - function(data) { - assert.equal(data.id.length > 0, true); - done(); - }, - function(err) { - done(new Error(err.message)); - } - ); + function(data) { + assert.equal(data.id.length > 0, true); + done(); }, function(err) { done(new Error(err.message)); @@ -56,7 +47,6 @@ describe('Client.Channels', function() { ); }); }); - */ it('updateChannel', function(done) { TestHelper.initBasic(() => { @@ -394,26 +384,20 @@ describe('Client.Channels', function() { }); }); - /* TODO FIX THIS TEST it('addChannelMember', function(done) { TestHelper.initBasic(() => { - TestHelper.basicClient().createUser( + TestHelper.basicClient().createUserWithInvite( TestHelper.fakeUser(), + null, + null, + TestHelper.basicTeam().invite_id, function(user2) { - TestHelper.basicClient().addUserToTeam( + TestHelper.basicClient().addChannelMember( + TestHelper.basicChannel().id, user2.id, - function() { - TestHelper.basicClient().addChannelMember( - TestHelper.basicChannel().id, - user2.id, - function(data) { - assert.equal(data.channel_id.length > 0, true); - done(); - }, - function(err) { - done(new Error(err.message)); - } - ); + function(data) { + assert.equal(data.channel_id.length > 0, true); + done(); }, function(err) { done(new Error(err.message)); @@ -426,7 +410,6 @@ describe('Client.Channels', function() { ); }); }); - */ it('removeChannelMember', function(done) { TestHelper.initBasic(() => { diff --git a/webapp/tests/client_user.test.jsx b/webapp/tests/client_user.test.jsx index 741f494bb..643640b59 100644 --- a/webapp/tests/client_user.test.jsx +++ b/webapp/tests/client_user.test.jsx @@ -258,16 +258,15 @@ describe('Client.User', function() { }); }); - /* TODO: FIX THIS TEST it('updateActive', function(done) { TestHelper.initBasic(() => { - var user = TestHelper.basicUser(); + const user = TestHelper.basicUser(); TestHelper.basicClient().updateActive( user.id, false, function(data) { - assert.equal(data.last_activity_at > 0, true); + assert.ok(data.delete_at > 0); done(); }, function(err) { @@ -275,7 +274,7 @@ describe('Client.User', function() { } ); }); - });*/ + }); it('sendPasswordReset', function(done) { TestHelper.initBasic(() => { |