forked from forgejo/forgejo
Add option to change username to the admin panel (#14229)
Co-authored-by: Bwko <bouwko@gmail.com> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
d989247bb0
commit
6b3b6f1833
9 changed files with 122 additions and 43 deletions
|
@ -24,21 +24,6 @@ func assertUserDeleted(t *testing.T, userID int64) {
|
|||
models.AssertNotExistsBean(t, &models.Star{UID: userID})
|
||||
}
|
||||
|
||||
func TestAdminDeleteUser(t *testing.T) {
|
||||
defer prepareTestEnv(t)()
|
||||
|
||||
session := loginUser(t, "user1")
|
||||
|
||||
csrf := GetCSRF(t, session, "/admin/users/8")
|
||||
req := NewRequestWithValues(t, "POST", "/admin/users/8/delete", map[string]string{
|
||||
"_csrf": csrf,
|
||||
})
|
||||
session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
assertUserDeleted(t, 8)
|
||||
models.CheckConsistencyFor(t, &models.User{})
|
||||
}
|
||||
|
||||
func TestUserDeleteAccount(t *testing.T) {
|
||||
defer prepareTestEnv(t)()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue