mirror of
https://github.com/go-gitea/gitea
synced 2025-07-13 22:17:20 +00:00
Improve the maintainblity of the reserved username list (#32229)
This commit is contained in:
@ -114,12 +114,10 @@ func TestRenameUser(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("Non usable username", func(t *testing.T) {
|
||||
usernames := []string{"--diff", "aa.png", ".well-known", "search", "aaa.atom"}
|
||||
usernames := []string{"--diff", ".well-known", "gitea-actions", "aaa.atom", "aa.png"}
|
||||
for _, username := range usernames {
|
||||
t.Run(username, func(t *testing.T) {
|
||||
assert.Error(t, user_model.IsUsableUsername(username))
|
||||
assert.Error(t, RenameUser(db.DefaultContext, user, username))
|
||||
})
|
||||
assert.Error(t, user_model.IsUsableUsername(username), "non-usable username: %s", username)
|
||||
assert.Error(t, RenameUser(db.DefaultContext, user, username), "non-usable username: %s", username)
|
||||
}
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user