(t *testing.T)
| 118 | } |
| 119 | |
| 120 | func TestRequestPreservesBaseTrailingSlash(t *testing.T) { |
| 121 | r := &Request{baseURL: &url.URL{}, pathPrefix: "/path/"} |
| 122 | if s := r.URL().String(); s != "/path/" { |
| 123 | t.Errorf("trailing slash should be preserved: %s", s) |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | func TestRequestAbsPathPreservesTrailingSlash(t *testing.T) { |
| 128 | r := (&Request{baseURL: &url.URL{}}).AbsPath("/foo/") |