1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

[GITEA] add option for banning dots in usernames (squash) set in test

This commit is contained in:
Earl Warren 2024-01-08 17:53:02 +01:00
parent 2c0105ef17
commit b005b586c3
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -556,6 +556,11 @@ func Test_ValidateUser(t *testing.T) {
}
func Test_NormalizeUserFromEmail(t *testing.T) {
oldSetting := setting.Service.AllowDotsInUsernames
defer func() {
setting.Service.AllowDotsInUsernames = oldSetting
}()
setting.Service.AllowDotsInUsernames = true
testCases := []struct {
Input string
Expected string