(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func 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 | |
| 29 | func TestChecksStatus_SummarisingCheckRuns(t *testing.T) { |
| 30 | t.Parallel() |
nothing calls this directly
no test coverage detected