MCPcopy Index your code
hub / github.com/cli/cli / TestJSONProjectItem_Issue

Function TestJSONProjectItem_Issue

pkg/cmd/project/shared/queries/export_data_test.go:191–203  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

189}
190
191func TestJSONProjectItem_Issue(t *testing.T) {
192 item := ProjectItem{}
193 item.Content.TypeName = "Issue"
194 item.Id = "123"
195 item.Content.Issue.Title = "title"
196 item.Content.Issue.Body = "a body"
197 item.Content.Issue.URL = "a-url"
198
199 b, err := json.Marshal(item.ExportData(nil))
200 assert.NoError(t, err)
201
202 assert.JSONEq(t, `{"id":"123","title":"title","body":"a body","type":"Issue","url":"a-url"}`, string(b))
203}
204
205func TestJSONProjectItem_PullRequest(t *testing.T) {
206 item := ProjectItem{}

Callers

nothing calls this directly

Calls 1

ExportDataMethod · 0.95

Tested by

no test coverage detected