(t *testing.T)
| 1416 | } |
| 1417 | |
| 1418 | func Test_apiRun_HEAD(t *testing.T) { |
| 1419 | ios, _, _, _ := iostreams.Test() |
| 1420 | |
| 1421 | err := apiRun(&ApiOptions{ |
| 1422 | IO: ios, |
| 1423 | Config: func() (gh.Config, error) { |
| 1424 | return config.NewMockConfig(), nil |
| 1425 | }, |
| 1426 | HttpClient: func(rootapi.HTTPClientOptions) (*http.Client, error) { |
| 1427 | var tr roundTripper = func(req *http.Request) (*http.Response, error) { |
| 1428 | return &http.Response{ |
| 1429 | StatusCode: 422, |
| 1430 | Request: req, |
| 1431 | Header: map[string][]string{ |
| 1432 | "Content-Type": {"application/json"}, |
| 1433 | }}, nil |
| 1434 | } |
| 1435 | return &http.Client{Transport: tr}, nil |
| 1436 | }, |
| 1437 | MagicFields: []string(nil), |
| 1438 | RawFields: []string(nil), |
| 1439 | RequestMethod: "HEAD", |
| 1440 | RequestMethodPassed: true, |
| 1441 | }) |
| 1442 | if err != cmdutil.SilentError { |
| 1443 | t.Fatalf("got error %v", err) |
| 1444 | } |
| 1445 | } |
| 1446 | |
| 1447 | func Test_apiRun_inputFile(t *testing.T) { |
| 1448 | tests := []struct { |
nothing calls this directly
no test coverage detected