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

Function TestListSubscriptionsDecodesFields

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

Source from the content-addressed store, hash-verified

171}
172
173func TestListSubscriptionsDecodesFields(t *testing.T) {
174 client, reg := newTestClient(t, "github.com")
175 reg.Register(httpmock.REST("GET", "event-subscriptions"),
176 httpmock.StringResponse(`{"subscriptions": [`+subscriptionJSON+`]}`))
177
178 subs, err := client.ListSubscriptions(context.Background(), 30)
179
180 require.NoError(t, err)
181 assert.Equal(t, []Subscription{*wantSubscription}, subs)
182}
183
184func TestDeleteSubscription(t *testing.T) {
185 client, reg := newTestClient(t, "github.com")

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected