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

Function Test_List_perRepository

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

Source from the content-addressed store, hash-verified

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

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