summaryrefslogtreecommitdiffstats
path: root/store/sql_channel_store_test.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-10-22 18:04:06 -0700
committer=Corey Hulen <corey@hulen.com>2015-10-22 18:04:06 -0700
commitae5d1898037be4f59bf6517ad76b13cc16f595ce (patch)
tree17c021c2e2a6d785ac3618b6c302742e00978207 /store/sql_channel_store_test.go
parent649f42e3fc706f8fa829276bcdb825381bc703f2 (diff)
downloadchat-ae5d1898037be4f59bf6517ad76b13cc16f595ce.tar.gz
chat-ae5d1898037be4f59bf6517ad76b13cc16f595ce.tar.bz2
chat-ae5d1898037be4f59bf6517ad76b13cc16f595ce.zip
Adding analytics tab
Diffstat (limited to 'store/sql_channel_store_test.go')
-rw-r--r--store/sql_channel_store_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/store/sql_channel_store_test.go b/store/sql_channel_store_test.go
index b4e0f7593..3bfafff4b 100644
--- a/store/sql_channel_store_test.go
+++ b/store/sql_channel_store_test.go
@@ -460,6 +460,24 @@ func TestChannelStoreGetMoreChannels(t *testing.T) {
if list.Channels[0].Name != o3.Name {
t.Fatal("missing channel")
}
+
+ if r1 := <-store.Channel().AnalyticsTypeCount(o1.TeamId, model.CHANNEL_OPEN); r1.Err != nil {
+ t.Fatal(r1.Err)
+ } else {
+ if r1.Data.(int64) != 2 {
+ t.Log(r1.Data)
+ t.Fatal("wrong value")
+ }
+ }
+
+ if r1 := <-store.Channel().AnalyticsTypeCount(o1.TeamId, model.CHANNEL_PRIVATE); r1.Err != nil {
+ t.Fatal(r1.Err)
+ } else {
+ if r1.Data.(int64) != 2 {
+ t.Log(r1.Data)
+ t.Fatal("wrong value")
+ }
+ }
}
func TestChannelStoreGetChannelCounts(t *testing.T) {