summaryrefslogtreecommitdiffstats
path: root/store/sql_user_store_test.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-09-23 15:52:59 -0700
committer=Corey Hulen <corey@hulen.com>2015-09-23 15:52:59 -0700
commit00112cae5123b02eee79e8b991618ed5069e07b1 (patch)
treeba8862900e2ed84bd7f3b720227448e05fe88efa /store/sql_user_store_test.go
parent985aebf86120188c2a14adfab39af7c4da3c1c9d (diff)
downloadchat-00112cae5123b02eee79e8b991618ed5069e07b1.tar.gz
chat-00112cae5123b02eee79e8b991618ed5069e07b1.tar.bz2
chat-00112cae5123b02eee79e8b991618ed5069e07b1.zip
Assiging first user system_admin role
Diffstat (limited to 'store/sql_user_store_test.go')
-rw-r--r--store/sql_user_store_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/store/sql_user_store_test.go b/store/sql_user_store_test.go
index 466da2845..e2a454023 100644
--- a/store/sql_user_store_test.go
+++ b/store/sql_user_store_test.go
@@ -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()