(t *testing.T)
| 195 | } |
| 196 | |
| 197 | func TestPatchStandard(t *testing.T) { |
| 198 | requestAddr := runGoHTTPServer() |
| 199 | |
| 200 | req := New() |
| 201 | req.SetURL(requestAddr + "/patch") |
| 202 | req.SetHeaders(map[string]string{ |
| 203 | "Authorization": "Bearer token", |
| 204 | }) |
| 205 | req.SetBody(&myBody{ |
| 206 | Name: "foo", |
| 207 | Email: "bar@gmail.com", |
| 208 | }) |
| 209 | |
| 210 | resp, err := req.PATCH() |
| 211 | if err != nil { |
| 212 | t.Fatal(err) |
| 213 | } |
| 214 | |
| 215 | result := &StdResult{} |
| 216 | err = resp.BindJSON(result) |
| 217 | if err != nil { |
| 218 | t.Fatal(err) |
| 219 | } |
| 220 | |
| 221 | t.Logf("%+v", result) |
| 222 | } |
| 223 | |
| 224 | // ------------------------------------------------------------------------------------------ |
| 225 |
nothing calls this directly
no test coverage detected