diff options
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 ddd7e5bb8..e2a454023 100644 --- a/store/sql_user_store_test.go +++ b/store/sql_user_store_test.go @@ -42,7 +42,7 @@ func TestUserStoreSave(t *testing.T) { t.Fatal("should be unique username") } - for i := 0; i < 150; i++ { + for i := 0; i < 50; i++ { u1.Id = "" u1.Email = model.NewId() u1.Username = model.NewId() @@ -206,6 +206,24 @@ func TestUserStoreGet(t *testing.T) { } } +func TestUserCountt(t *testing.T) { + Setup() + + u1 := model.User{} + u1.TeamId = model.NewId() + u1.Email = model.NewId() + Must(store.User().Save(&u1)) + + if result := <-store.User().GetTotalUsersCount(); result.Err != nil { + t.Fatal(result.Err) + } else { + count := result.Data.(int64) + if count <= 0 { + t.Fatal() + } + } +} + func TestUserStoreGetProfiles(t *testing.T) { Setup() |