(t *testing.T)
| 160 | } |
| 161 | |
| 162 | func TestDoRequestCreated(t *testing.T) { |
| 163 | testServer, fakeHandler, status := testServerEnv(t, 201) |
| 164 | defer testServer.Close() |
| 165 | |
| 166 | c, err := restClient(testServer) |
| 167 | if err != nil { |
| 168 | t.Fatalf("unexpected error: %v", err) |
| 169 | } |
| 170 | created := false |
| 171 | body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() |
| 172 | |
| 173 | testParam := TestParam{actualError: err, expectingError: false, expCreated: true, |
| 174 | expStatus: status, testBody: false} |
| 175 | validate(testParam, t, body, fakeHandler) |
| 176 | } |
| 177 | |
| 178 | func TestDoRequestNotCreated(t *testing.T) { |
| 179 | testServer, fakeHandler, expectedStatus := testServerEnv(t, 202) |
nothing calls this directly
no test coverage detected