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

Function TestDeleteSubscription

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

Source from the content-addressed store, hash-verified

182}
183
184func TestDeleteSubscription(t *testing.T) {
185 client, reg := newTestClient(t, "github.com")
186 reg.Register(httpmock.REST("DELETE", "event-subscriptions/sub_1"), httpmock.StatusStringResponse(http.StatusNoContent, ""))
187
188 err := client.DeleteSubscription(context.Background(), "sub_1")
189
190 require.NoError(t, err)
191}
192
193func TestClientErrors(t *testing.T) {
194 create := func(c EventClient) error {

Callers

nothing calls this directly

Calls 5

RESTFunction · 0.92
StatusStringResponseFunction · 0.92
newTestClientFunction · 0.70
DeleteSubscriptionMethod · 0.65
RegisterMethod · 0.45

Tested by

no test coverage detected