summaryrefslogtreecommitdiffstats
path: root/store/sql_user_store_test.go
diff options
context:
space:
mode:
authorStas Vovk <stasvovk@gmail.com>2015-10-13 14:52:29 +0300
committerStas Vovk <stasvovk@gmail.com>2015-10-13 14:52:29 +0300
commita1328fc8b5d03ec73f1bad588d2f0bb688b1c206 (patch)
tree4d47c0e181ebe961ab2a8a02f2698faeafba9434 /store/sql_user_store_test.go
parent822881e51aa2edce1c4d7d2e11bc44c3886daf1e (diff)
parent0144b6fd8a95c6b65695b07483a528707dce1cfe (diff)
downloadchat-a1328fc8b5d03ec73f1bad588d2f0bb688b1c206.tar.gz
chat-a1328fc8b5d03ec73f1bad588d2f0bb688b1c206.tar.bz2
chat-a1328fc8b5d03ec73f1bad588d2f0bb688b1c206.zip
Merge branch 'master' into PLT-589
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()