(t *testing.T)
| 205 | } |
| 206 | |
| 207 | func TestBadRequest(t *testing.T) { |
| 208 | testServer, fakeHandler, _ := testServerEnv(t, 400) |
| 209 | defer testServer.Close() |
| 210 | c, err := restClient(testServer) |
| 211 | if err != nil { |
| 212 | t.Fatalf("unexpected error: %v", err) |
| 213 | } |
| 214 | created := false |
| 215 | body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() |
| 216 | testParam := TestParam{actualError: err, expectingError: true, expCreated: false, |
| 217 | testBody: true} |
| 218 | validate(testParam, t, body, fakeHandler) |
| 219 | } |
| 220 | |
| 221 | func validate(testParam TestParam, t *testing.T, body []byte, fakeHandler *utiltesting.FakeHandler) { |
| 222 | switch { |
nothing calls this directly
no test coverage detected