(t *testing.T)
| 502 | } |
| 503 | |
| 504 | func Test_removeRun_user(t *testing.T) { |
| 505 | reg := &httpmock.Registry{} |
| 506 | |
| 507 | reg.Register( |
| 508 | httpmock.REST("DELETE", "user/codespaces/secrets/cool_secret"), |
| 509 | httpmock.StatusStringResponse(204, "No Content")) |
| 510 | |
| 511 | ios, _, _, _ := iostreams.Test() |
| 512 | |
| 513 | opts := &DeleteOptions{ |
| 514 | IO: ios, |
| 515 | HttpClient: func() (*http.Client, error) { |
| 516 | return &http.Client{Transport: reg}, nil |
| 517 | }, |
| 518 | Config: func() (gh.Config, error) { |
| 519 | return config.NewBlankConfig(), nil |
| 520 | }, |
| 521 | SecretName: "cool_secret", |
| 522 | UserSecrets: true, |
| 523 | } |
| 524 | |
| 525 | err := removeRun(opts) |
| 526 | assert.NoError(t, err) |
| 527 | |
| 528 | reg.Verify(t) |
| 529 | } |
nothing calls this directly
no test coverage detected