(t *testing.T)
| 1235 | } |
| 1236 | |
| 1237 | func Test_apiRun_HEAD(t *testing.T) { |
| 1238 | ios, _, _, _ := iostreams.Test() |
| 1239 | |
| 1240 | err := apiRun(&ApiOptions{ |
| 1241 | IO: ios, |
| 1242 | Config: func() (gh.Config, error) { |
| 1243 | return config.NewBlankConfig(), nil |
| 1244 | }, |
| 1245 | HttpClient: func() (*http.Client, error) { |
| 1246 | var tr roundTripper = func(req *http.Request) (*http.Response, error) { |
| 1247 | return &http.Response{ |
| 1248 | StatusCode: 422, |
| 1249 | Request: req, |
| 1250 | Header: map[string][]string{ |
| 1251 | "Content-Type": {"application/json"}, |
| 1252 | }}, nil |
| 1253 | } |
| 1254 | return &http.Client{Transport: tr}, nil |
| 1255 | }, |
| 1256 | MagicFields: []string(nil), |
| 1257 | RawFields: []string(nil), |
| 1258 | RequestMethod: "HEAD", |
| 1259 | RequestMethodPassed: true, |
| 1260 | }) |
| 1261 | if err != cmdutil.SilentError { |
| 1262 | t.Fatalf("got error %v", err) |
| 1263 | } |
| 1264 | } |
| 1265 | |
| 1266 | func Test_apiRun_inputFile(t *testing.T) { |
| 1267 | tests := []struct { |
nothing calls this directly
no test coverage detected