From 8239c68cf323e4bb20007d2b456336becead273d Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Thu, 25 Feb 2016 12:32:46 -0500 Subject: Refactor and modularize analytics on the client --- api/admin_test.go | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'api/admin_test.go') diff --git a/api/admin_test.go b/api/admin_test.go index 8a9c82b44..bdea0bc5b 100644 --- a/api/admin_test.go +++ b/api/admin_test.go @@ -254,6 +254,16 @@ func TestGetTeamAnalyticsStandard(t *testing.T) { t.Log(rows.ToJson()) t.Fatal() } + + if rows[4].Name != "team_count" { + t.Log(rows.ToJson()) + t.Fatal() + } + + if rows[4].Value == 0 { + t.Log(rows.ToJson()) + t.Fatal() + } } if result, err := Client.GetSystemAnalytics("standard"); err != nil { @@ -300,6 +310,16 @@ func TestGetTeamAnalyticsStandard(t *testing.T) { t.Log(rows.ToJson()) t.Fatal() } + + if rows[4].Name != "team_count" { + t.Log(rows.ToJson()) + t.Fatal() + } + + if rows[4].Value == 0 { + t.Log(rows.ToJson()) + t.Fatal() + } } } @@ -469,6 +489,26 @@ func TestGetTeamAnalyticsExtra(t *testing.T) { t.Log(rows.ToJson()) t.Fatal() } + + if rows[4].Name != "command_count" { + t.Log(rows.ToJson()) + t.Fatal() + } + + if rows[4].Value != 0 { + t.Log(rows.ToJson()) + t.Fatal() + } + + if rows[5].Name != "session_count" { + t.Log(rows.ToJson()) + t.Fatal() + } + + if rows[5].Value == 0 { + t.Log(rows.ToJson()) + t.Fatal() + } } if result, err := Client.GetSystemAnalytics("extra_counts"); err != nil { @@ -500,5 +540,15 @@ func TestGetTeamAnalyticsExtra(t *testing.T) { t.Log(rows.ToJson()) t.Fatal() } + + if rows[4].Name != "command_count" { + t.Log(rows.ToJson()) + t.Fatal() + } + + if rows[5].Name != "session_count" { + t.Log(rows.ToJson()) + t.Fatal() + } } } -- cgit v1.2.3-1-g7c22