(t *testing.T)
| 409 | } |
| 410 | |
| 411 | func Test_NewCmdApi_WindowsAbsPath(t *testing.T) { |
| 412 | if runtime.GOOS != "windows" { |
| 413 | t.SkipNow() |
| 414 | } |
| 415 | |
| 416 | cmd := NewCmdApi(&cmdutil.Factory{}, func(opts *ApiOptions) error { |
| 417 | return nil |
| 418 | }) |
| 419 | |
| 420 | cmd.SetArgs([]string{`C:\users\repos`}) |
| 421 | _, err := cmd.ExecuteC() |
| 422 | assert.EqualError(t, err, `invalid API endpoint: "C:\users\repos". Your shell might be rewriting URL paths as filesystem paths. To avoid this, omit the leading slash from the endpoint argument`) |
| 423 | } |
| 424 | |
| 425 | func Test_apiRun(t *testing.T) { |
| 426 | tests := []struct { |
nothing calls this directly
no test coverage detected