|
|
|
|
@ -1226,6 +1226,17 @@ func TestSubRouter(t *testing.T) {
@@ -1226,6 +1226,17 @@ func TestSubRouter(t *testing.T) {
|
|
|
|
|
hostTemplate: `google.com`, |
|
|
|
|
shouldMatch: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "Prefer scheme on child route when building URLs", |
|
|
|
|
route: new(Route).Schemes("https", "ftp").Host("google.com").Subrouter().Schemes("ftp").Path("/"), |
|
|
|
|
request: newRequest("GET", "ftp://google.com/"), |
|
|
|
|
scheme: "ftp", |
|
|
|
|
host: "google.com", |
|
|
|
|
path: "/", |
|
|
|
|
pathTemplate: `/`, |
|
|
|
|
hostTemplate: `google.com`, |
|
|
|
|
shouldMatch: true, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for _, test := range tests { |
|
|
|
|
|