(t *testing.T)
| 412 | } |
| 413 | |
| 414 | func Test_NewCmdApi_WindowsAbsPath(t *testing.T) { |
| 415 | if runtime.GOOS != "windows" { |
| 416 | t.SkipNow() |
| 417 | } |
| 418 | |
| 419 | cmd := NewCmdApi(&cmdutil.Factory{}, func(opts *ApiOptions) error { |
| 420 | return nil |
| 421 | }) |
| 422 | |
| 423 | cmd.SetArgs([]string{`C:\users\repos`}) |
| 424 | _, err := cmd.ExecuteC() |
| 425 | 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`) |
| 426 | } |
| 427 | |
| 428 | func TestNewCmdApiTelemetry(t *testing.T) { |
| 429 | server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
nothing calls this directly
no test coverage detected