summaryrefslogtreecommitdiffstats
path: root/store/sql_channel_store_test.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-01-03 11:45:45 -0500
committerenahum <nahumhbl@gmail.com>2017-01-03 13:45:45 -0300
commitf48c646208cb5227b8f6c6a5139bf9af66da802d (patch)
tree99c53f9bf77f43705933c78e062061177b948aa5 /store/sql_channel_store_test.go
parentf94e220c88e2c233536f48ce42a2dfba8c3403b8 (diff)
downloadchat-f48c646208cb5227b8f6c6a5139bf9af66da802d.tar.gz
chat-f48c646208cb5227b8f6c6a5139bf9af66da802d.tar.bz2
chat-f48c646208cb5227b8f6c6a5139bf9af66da802d.zip
Fixing should send event removing extra go channel creation (#4942)
Diffstat (limited to 'store/sql_channel_store_test.go')
-rw-r--r--store/sql_channel_store_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/store/sql_channel_store_test.go b/store/sql_channel_store_test.go
index 7aeef98cc..6186a242c 100644
--- a/store/sql_channel_store_test.go
+++ b/store/sql_channel_store_test.go
@@ -419,6 +419,14 @@ func TestChannelMemberStore(t *testing.T) {
t.Fatal("should have saved 2 members")
}
+ if store.Channel().GetMemberCountFromCache(o1.ChannelId) != 2 {
+ t.Fatal("should have saved 2 members")
+ }
+
+ if store.Channel().GetMemberCountFromCache("junk") != 0 {
+ t.Fatal("should have saved 0 members")
+ }
+
count = (<-store.Channel().GetMemberCount(o1.ChannelId, false)).Data.(int64)
if count != 2 {
t.Fatal("should have saved 2 members")