summaryrefslogtreecommitdiffstats
path: root/store/sql_user_store_test.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-10-09 12:24:39 -0700
committer=Corey Hulen <corey@hulen.com>2015-10-09 12:24:39 -0700
commit61f92517f317f4b3f437b8db48f31c569ceb5f2d (patch)
tree23b9d7227a502a54187af96ec91eed6e1f4b7d69 /store/sql_user_store_test.go
parent12cd7c03d6676466f7b10b8e80b4e05edab0cf2a (diff)
downloadchat-61f92517f317f4b3f437b8db48f31c569ceb5f2d.tar.gz
chat-61f92517f317f4b3f437b8db48f31c569ceb5f2d.tar.bz2
chat-61f92517f317f4b3f437b8db48f31c569ceb5f2d.zip
PLT-586 fixing issues with security alert
Diffstat (limited to 'store/sql_user_store_test.go')
-rw-r--r--store/sql_user_store_test.go20
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()