mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 01:05:14 +00:00
[GITEA] add option for banning dots in usernames (squash) set in test
(cherry picked from commitb005b586c3
) (cherry picked from commit0077b2661e
) (cherry picked from commitc4589d1fce
) (cherry picked from commita7f9ff982c
)
This commit is contained in:
parent
e019eb33a2
commit
2e172b3c9c
|
@ -505,6 +505,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
|
||||
|
|
Loading…
Reference in a new issue