requireWebhookCount asserts the exact count of webhooks for (project, eventTitle).
(t *testing.T, c *webhookCollector, projectName, eventTitle string, n int)
| 92 | |
| 93 | // requireWebhookCount asserts the exact count of webhooks for (project, eventTitle). |
| 94 | func requireWebhookCount(t *testing.T, c *webhookCollector, projectName, eventTitle string, n int) { |
| 95 | t.Helper() |
| 96 | got := countWebhooksFor(c, projectName, eventTitle) |
| 97 | require.Equalf(t, n, got, "expected %d %q webhooks on %s, got %d", n, eventTitle, projectName, got) |
| 98 | } |
| 99 | |
| 100 | func countWebhooksFor(c *webhookCollector, projectName, eventTitle string) int { |
| 101 | n := 0 |
no test coverage detected