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