[GITEA] add option for banning dots in usernames (squash) set in test
(cherry picked from commit b005b586c354119d2b6aaf6e4c18eb3f1ddfb615) (cherry picked from commit 0077b2661e7e5be7b2e3772113abeb401f4085d5) (cherry picked from commit c4589d1fce5eac383dd8530427140183a7aeff46) (cherry picked from commit a7f9ff982c0c14e9484561e194d4fa7c5d80a76b)
This commit is contained in:
parent
e019eb33a2
commit
2e172b3c9c
1 changed files with 5 additions and 0 deletions
|
@ -505,6 +505,11 @@ func Test_ValidateUser(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_NormalizeUserFromEmail(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 {
|
testCases := []struct {
|
||||||
Input string
|
Input string
|
||||||
Expected string
|
Expected string
|
||||||
|
|
Loading…
Reference in a new issue