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

Function mockPullRequestUpdateWithoutBody

pkg/cmd/pr/edit/edit_test.go:1873–1881  ·  view source on GitHub ↗

A dropped body is absent from the input, which is not the same as a body sent with its old value.

(t *testing.T, reg *httpmock.Registry, wantTitle string)

Source from the content-addressed store, hash-verified

1871// A dropped body is absent from the input, which is not the same as a body sent
1872// with its old value.
1873func mockPullRequestUpdateWithoutBody(t *testing.T, reg *httpmock.Registry, wantTitle string) {
1874 reg.Register(
1875 httpmock.GraphQL(`mutation PullRequestUpdate\b`),
1876 httpmock.GraphQLMutation(`{}`, func(inputs map[string]any) {
1877 assert.Equal(t, wantTitle, inputs["title"])
1878 assert.NotContains(t, inputs, "body")
1879 }),
1880 )
1881}
1882
1883func mockPullRequestUpdateApiActors(reg *httpmock.Registry) {
1884 reg.Register(

Callers 1

Test_editRunFunction · 0.85

Calls 4

GraphQLFunction · 0.92
GraphQLMutationFunction · 0.92
EqualMethod · 0.80
RegisterMethod · 0.45

Tested by

no test coverage detected