mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Clarify the suffices and prefixes of setting.AppSubURL and setting.AppURL (#12999)
Also removes some unnecessary uses of fmt.Sprintf and adds documentation strings Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		@@ -26,7 +26,7 @@ func TestAction_GetRepoLink(t *testing.T) {
 | 
			
		||||
	repo := AssertExistsAndLoadBean(t, &Repository{}).(*Repository)
 | 
			
		||||
	owner := AssertExistsAndLoadBean(t, &User{ID: repo.OwnerID}).(*User)
 | 
			
		||||
	action := &Action{RepoID: repo.ID}
 | 
			
		||||
	setting.AppSubURL = "/suburl/"
 | 
			
		||||
	setting.AppSubURL = "/suburl"
 | 
			
		||||
	expected := path.Join(setting.AppSubURL, owner.Name, repo.Name)
 | 
			
		||||
	assert.Equal(t, expected, action.GetRepoLink())
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user