diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-04-18 12:07:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 12:07:30 +0800 |
commit | 9d64d222a8c30db5076a591981ad7cfe672ba6f1 (patch) | |
tree | c753eb898a1ead0afbe5b6a7a28b466ab0d2b8ac /internal/route/org | |
parent | fa497b16332c24bc4d9e788c64bda94e3c1499a7 (diff) |
db: add tests for users (#6116)
* Add new methods
* Use Users.Create to replace previous hack
* Reduce side effect
* Do not clear tables when test failed
* test_users_Authenticate
* Rename constant
* test_users_Create
* test_users_GetByEmail
* test_users_GetByID
* test_users_GetByUsername
Diffstat (limited to 'internal/route/org')
-rw-r--r-- | internal/route/org/org.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/route/org/org.go b/internal/route/org/org.go index 3a92e553..424cbd15 100644 --- a/internal/route/org/org.go +++ b/internal/route/org/org.go @@ -32,7 +32,7 @@ func CreatePost(c *context.Context, f form.CreateOrg) { org := &db.User{ Name: f.OrgName, IsActive: true, - Type: db.USER_TYPE_ORGANIZATION, + Type: db.UserOrganization, } if err := db.CreateOrganization(org, c.User); err != nil { |