MCPcopy Create free account
hub / github.com/cli/cli / TestDeleteRepo

Function TestDeleteRepo

pkg/cmd/repo/delete/http_test.go:14–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestDeleteRepo(t *testing.T) {
15 reg := &httpmock.Registry{}
16 defer reg.Verify(t)
17
18 reg.Register(
19 httpmock.REST("DELETE", "repos/OWNER/REPO"),
20 httpmock.StatusStringResponse(204, ""),
21 )
22
23 require.NoError(t, deleteRepo(&http.Client{Transport: reg}, ghrepo.New("OWNER", "REPO")))
24}
25
26// TestDeleteRepoMissingScope pins the scopes suggestion, which is the reason this call site
27// needs the delete_repo scope declared rather than relying on what the API reports.

Callers

nothing calls this directly

Calls 6

VerifyMethod · 0.95
RegisterMethod · 0.95
RESTFunction · 0.92
StatusStringResponseFunction · 0.92
NewFunction · 0.92
deleteRepoFunction · 0.85

Tested by

no test coverage detected