|
|
@ -48,6 +48,8 @@ func TestRedirectsNoLogin(t *testing.T) { |
|
|
|
var redirects = map[string]string{ |
|
|
|
var redirects = map[string]string{ |
|
|
|
"/user2/repo1/commits/master": "/user2/repo1/commits/branch/master", |
|
|
|
"/user2/repo1/commits/master": "/user2/repo1/commits/branch/master", |
|
|
|
"/user2/repo1/src/master": "/user2/repo1/src/branch/master", |
|
|
|
"/user2/repo1/src/master": "/user2/repo1/src/branch/master", |
|
|
|
|
|
|
|
"/user2/repo1/src/master/file.txt": "/user2/repo1/src/branch/master/file.txt", |
|
|
|
|
|
|
|
"/user2/repo1/src/master/directory/file.txt": "/user2/repo1/src/branch/master/directory/file.txt", |
|
|
|
} |
|
|
|
} |
|
|
|
for link, redirectLink := range redirects { |
|
|
|
for link, redirectLink := range redirects { |
|
|
|
req := NewRequest(t, "GET", link) |
|
|
|
req := NewRequest(t, "GET", link) |
|
|
|