mirror of
https://github.com/gogs/gogs.git
synced 2025-12-21 15:50:00 +01:00
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
This commit is contained in:
@@ -90,7 +90,7 @@ func EditUser(c *context.APIContext, form api.EditUserOption) {
|
||||
c.Error(err, "get user salt")
|
||||
return
|
||||
}
|
||||
u.EncodePasswd()
|
||||
u.EncodePassword()
|
||||
}
|
||||
|
||||
u.LoginName = form.LoginName
|
||||
|
||||
Reference in New Issue
Block a user