MCPcopy
hub / github.com/cli/cli / TestChecksStatus_NoCheckRunsOrStatusContexts

Function TestChecksStatus_NoCheckRunsOrStatusContexts

api/pull_request_test.go:11–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestChecksStatus_NoCheckRunsOrStatusContexts(t *testing.T) {
12 t.Parallel()
13
14 payload := `
15 { "statusCheckRollup": { "nodes": [] } }
16 `
17 var pr PullRequest
18 require.NoError(t, json.Unmarshal([]byte(payload), &pr))
19
20 expectedChecksStatus := PullRequestChecksStatus{
21 Pending: 0,
22 Failing: 0,
23 Passing: 0,
24 Total: 0,
25 }
26 require.Equal(t, expectedChecksStatus, pr.ChecksStatus())
27}
28
29func TestChecksStatus_SummarisingCheckRuns(t *testing.T) {
30 t.Parallel()

Callers

nothing calls this directly

Calls 2

ChecksStatusMethod · 0.95
EqualMethod · 0.80

Tested by

no test coverage detected