(t *testing.T)
| 1315 | } |
| 1316 | |
| 1317 | func Test_apiRun_HEAD(t *testing.T) { |
| 1318 | ios, _, _, _ := iostreams.Test() |
| 1319 | |
| 1320 | err := apiRun(&ApiOptions{ |
| 1321 | IO: ios, |
| 1322 | Config: func() (gh.Config, error) { |
| 1323 | return config.NewBlankConfig(), nil |
| 1324 | }, |
| 1325 | HttpClient: func() (*http.Client, error) { |
| 1326 | var tr roundTripper = func(req *http.Request) (*http.Response, error) { |
| 1327 | return &http.Response{ |
| 1328 | StatusCode: 422, |
| 1329 | Request: req, |
| 1330 | Header: map[string][]string{ |
| 1331 | "Content-Type": {"application/json"}, |
| 1332 | }}, nil |
| 1333 | } |
| 1334 | return &http.Client{Transport: tr}, nil |
| 1335 | }, |
| 1336 | MagicFields: []string(nil), |
| 1337 | RawFields: []string(nil), |
| 1338 | RequestMethod: "HEAD", |
| 1339 | RequestMethodPassed: true, |
| 1340 | }) |
| 1341 | if err != cmdutil.SilentError { |
| 1342 | t.Fatalf("got error %v", err) |
| 1343 | } |
| 1344 | } |
| 1345 | |
| 1346 | func Test_apiRun_inputFile(t *testing.T) { |
| 1347 | tests := []struct { |
nothing calls this directly
no test coverage detected