handle https prefixes in baseUrl

This commit is contained in:
Mantas 2014-10-06 12:50:44 +03:00 committed by spf13
parent b98c2088f8
commit fb82f00f9d
2 changed files with 3 additions and 2 deletions

View file

@ -16,7 +16,8 @@ func TestFixUrl(t *testing.T) {
Result string
}
tests := []data{
{"Basic localhost", "", "http://foo.com", true, 1313, "http://localhost:1313"},
{"Basic http localhost", "", "http://foo.com", true, 1313, "http://localhost:1313"},
{"Basic https localhost", "", "https://foo.com", true, 1313, "https://localhost:1313"},
{"Basic subdir", "", "http://foo.com/bar", true, 1313, "http://localhost:1313/bar"},
{"Basic production", "http://foo.com", "http://foo.com", false, 80, "http://foo.com"},
{"Production subdir", "http://foo.com/bar", "http://foo.com/bar", false, 80, "http://foo.com/bar"},