mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 08:21:11 +00:00 
			
		
		
		
	[GITEA] add option for banning dots in usernames (squash) set in test
(cherry picked from commit b005b586c3)
	
	
This commit is contained in:
		
					parent
					
						
							
								3975a9f3aa
							
						
					
				
			
			
				commit
				
					
						0077b2661e
					
				
			
		
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -556,6 +556,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…
	
	Add table
		Add a link
		
	
		Reference in a new issue