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

Function TestGetSubscription

pkg/cmd/event/client/client_test.go:77–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

75}
76
77func TestGetSubscription(t *testing.T) {
78 client, reg := newTestClient(t, "github.com")
79 reg.Register(httpmock.REST("GET", "event-subscriptions/sub_1"), httpmock.StringResponse(subscriptionJSON))
80
81 sub, err := client.GetSubscription(context.Background(), "sub_1")
82
83 require.NoError(t, err)
84 assert.Equal(t, wantSubscription, sub)
85}
86
87func TestListSubscriptions(t *testing.T) {
88 page := func(link string, ids ...string) httpmock.Responder {

Callers

nothing calls this directly

Calls 6

RESTFunction · 0.92
StringResponseFunction · 0.92
EqualMethod · 0.80
newTestClientFunction · 0.70
GetSubscriptionMethod · 0.65
RegisterMethod · 0.45

Tested by

no test coverage detected