diff options
author | Corey Hulen <corey@hulen.com> | 2015-10-12 13:56:21 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-10-12 13:56:21 -0700 |
commit | a6a3c351a828441313e90c1ac8e6afbfadad1f7c (patch) | |
tree | e7d41a6789d421d8cbcbbb1417edf74810ac3672 /store/sql_user_store_test.go | |
parent | 7a469c8fc19694a2d6afd2bd420ba6fd3a9a0d93 (diff) | |
parent | 9f83a72f7330857e06095403c1cf5402bef455d6 (diff) | |
download | chat-a6a3c351a828441313e90c1ac8e6afbfadad1f7c.tar.gz chat-a6a3c351a828441313e90c1ac8e6afbfadad1f7c.tar.bz2 chat-a6a3c351a828441313e90c1ac8e6afbfadad1f7c.zip |
Merge pull request #997 from mattermost/PLT-586
PLT-586 fixing issues with security alert
Diffstat (limited to 'store/sql_user_store_test.go')
-rw-r--r-- | store/sql_user_store_test.go | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/store/sql_user_store_test.go b/store/sql_user_store_test.go index be21c8bd2..874baf634 100644 --- a/store/sql_user_store_test.go +++ b/store/sql_user_store_test.go @@ -206,7 +206,7 @@ func TestUserStoreGet(t *testing.T) { } } -func TestUserCountt(t *testing.T) { +func TestUserCount(t *testing.T) { Setup() u1 := model.User{} @@ -224,6 +224,24 @@ func TestUserCountt(t *testing.T) { } } +func TestActiveUserCount(t *testing.T) { + Setup() + + u1 := model.User{} + u1.TeamId = model.NewId() + u1.Email = model.NewId() + Must(store.User().Save(&u1)) + + if result := <-store.User().GetTotalActiveUsersCount(); result.Err != nil { + t.Fatal(result.Err) + } else { + count := result.Data.(int64) + if count <= 0 { + t.Fatal() + } + } +} + func TestUserStoreGetProfiles(t *testing.T) { Setup() |