(t *testing.T)
| 169 | } |
| 170 | |
| 171 | func TestRequestOrdersSubResource(t *testing.T) { |
| 172 | r := (&Request{ |
| 173 | baseURL: &url.URL{}, |
| 174 | pathPrefix: "/test/", |
| 175 | }).Name("bar").Resource("baz").Namespace("foo").Suffix("test").SubResource("a", "b") |
| 176 | if s := r.URL().String(); s != "/test/namespaces/foo/baz/bar/a/b/test" { |
| 177 | t.Errorf("namespace should be in order in path: %s", s) |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | func TestRequestSetTwiceError(t *testing.T) { |
| 182 | if (&Request{}).Name("bar").Name("baz").err == nil { |