diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2016-02-09 20:53:04 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2016-02-10 08:29:57 -0500 |
commit | 1eab2ef39350c1035864918f366ab593d23e0f5a (patch) | |
tree | 405f8b2310c0c0e14e0d60fe88e483c1320dd7f0 /store/sql_channel_store_test.go | |
parent | 6225522478f61aa134d167954d3116c72a6148c3 (diff) | |
download | chat-1eab2ef39350c1035864918f366ab593d23e0f5a.tar.gz chat-1eab2ef39350c1035864918f366ab593d23e0f5a.tar.bz2 chat-1eab2ef39350c1035864918f366ab593d23e0f5a.zip |
Stopped returning inactive members with getExtraInfo calls
Diffstat (limited to 'store/sql_channel_store_test.go')
-rw-r--r-- | store/sql_channel_store_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/store/sql_channel_store_test.go b/store/sql_channel_store_test.go index a3b0c2286..816a85aef 100644 --- a/store/sql_channel_store_test.go +++ b/store/sql_channel_store_test.go @@ -377,6 +377,18 @@ func TestChannelMemberStore(t *testing.T) { if t4 != t3 { t.Fatal("Should not update time upon failure") } + + // rejoin the channel and make sure that an inactive user isn't returned by GetExtraMambers + Must(store.Channel().SaveMember(&o2)) + + u2.DeleteAt = 1000 + Must(store.User().Update(&u2, true)) + + if result := <-store.Channel().GetExtraMembers(o1.ChannelId, 20); result.Err != nil { + t.Fatal(result.Err) + } else if extraMembers := result.Data.([]model.ExtraMember); len(extraMembers) != 1 { + t.Fatal("should have 1 extra members") + } } func TestChannelDeleteMemberStore(t *testing.T) { |