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:
6543 2021-01-10 13:14:02 +01:00 committed by GitHub
parent d989247bb0
commit 6b3b6f1833
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 122 additions and 43 deletions

View file

@ -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)()