diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-11-12 11:25:46 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-11-12 11:25:46 -0500 |
commit | be43522117e637271509cf24244f554a437c0578 (patch) | |
tree | 53b3d49a095efa96fa80592fdc2a5f5257b78058 /store/sql_channel_store_test.go | |
parent | 13a251a5ee940383e5a026284275b1f31fb476df (diff) | |
download | chat-be43522117e637271509cf24244f554a437c0578.tar.gz chat-be43522117e637271509cf24244f554a437c0578.tar.bz2 chat-be43522117e637271509cf24244f554a437c0578.zip |
Added ChannelExtra.MemberCount field to reflect the actual member count when we truncate the list of members to 20
Diffstat (limited to 'store/sql_channel_store_test.go')
-rw-r--r-- | store/sql_channel_store_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/store/sql_channel_store_test.go b/store/sql_channel_store_test.go index f6a0fb713..8662fcbd3 100644 --- a/store/sql_channel_store_test.go +++ b/store/sql_channel_store_test.go @@ -339,15 +339,15 @@ func TestChannelMemberStore(t *testing.T) { t.Fatal("Member update time incorrect") } - members := (<-store.Channel().GetMembers(o1.ChannelId)).Data.([]model.ChannelMember) - if len(members) != 2 { + count := (<-store.Channel().GetMemberCount(o1.ChannelId)).Data.(int64) + if count != 2 { t.Fatal("should have saved 2 members") } Must(store.Channel().RemoveMember(o2.ChannelId, o2.UserId)) - members = (<-store.Channel().GetMembers(o1.ChannelId)).Data.([]model.ChannelMember) - if len(members) != 1 { + count = (<-store.Channel().GetMemberCount(o1.ChannelId)).Data.(int64) + if count != 1 { t.Fatal("should have removed 1 member") } |