diff options
author | Maxim <mail@potapovmax.com> | 2015-10-13 10:15:44 +0300 |
---|---|---|
committer | Maxim <mail@potapovmax.com> | 2015-10-13 10:15:44 +0300 |
commit | 9d3248ccec89e533527bb86e082ef445c3cdfe7d (patch) | |
tree | fea41f942c66a2ae397ed12f1013585bcbf7775c /store/sql_user_store_test.go | |
parent | 53d58fc3374268484a6eb5d8aae2c82719ec782d (diff) | |
parent | 0144b6fd8a95c6b65695b07483a528707dce1cfe (diff) | |
download | chat-9d3248ccec89e533527bb86e082ef445c3cdfe7d.tar.gz chat-9d3248ccec89e533527bb86e082ef445c3cdfe7d.tar.bz2 chat-9d3248ccec89e533527bb86e082ef445c3cdfe7d.zip |
Merge branch 'master' into PLT-590
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() |