diff options
author | Corey Hulen <corey@hulen.com> | 2016-03-02 12:22:11 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-03-02 12:22:11 -0800 |
commit | c52153bf601cee5bc21e9e79efcd1fdd5ef1dac7 (patch) | |
tree | 822f5614a031f8d65c3ddca7e3e3dfec1152e053 /api/admin_test.go | |
parent | cddc9df7c4371e4240d65c6874155e1ce85adff0 (diff) | |
parent | fbb71cab4b4c0289c1f071f9fa2e61b0b0237ece (diff) | |
download | chat-c52153bf601cee5bc21e9e79efcd1fdd5ef1dac7.tar.gz chat-c52153bf601cee5bc21e9e79efcd1fdd5ef1dac7.tar.bz2 chat-c52153bf601cee5bc21e9e79efcd1fdd5ef1dac7.zip |
Merge pull request #2258 from mattermost/plt-1796
PLT-1796 Refactor and modularize analytics on the client
Diffstat (limited to 'api/admin_test.go')
-rw-r--r-- | api/admin_test.go | 50 |
1 files changed, 50 insertions, 0 deletions
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() + } } } |