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

Function Test_List_perRepository

pkg/cmd/run/download/http_test.go:45–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func Test_List_perRepository(t *testing.T) {
46 reg := &httpmock.Registry{}
47 defer reg.Verify(t)
48
49 reg.Register(
50 httpmock.REST("GET", "repos/OWNER/REPO/actions/artifacts"),
51 httpmock.StringResponse(`{}`))
52
53 api := &apiPlatform{
54 client: &http.Client{Transport: reg},
55 repo: ghrepo.New("OWNER", "REPO"),
56 }
57 _, err := api.List("")
58 require.NoError(t, err)
59}
60
61func Test_Download(t *testing.T) {
62 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 6

VerifyMethod · 0.95
RegisterMethod · 0.95
ListMethod · 0.95
RESTFunction · 0.92
StringResponseFunction · 0.92
NewFunction · 0.92

Tested by

no test coverage detected