(t *testing.T, messageID string)
| 217 | } |
| 218 | |
| 219 | func findFCMRequests(t *testing.T, messageID string) []wmJournal.GetRequestResponse { |
| 220 | t.Helper() |
| 221 | wm := newWireMockClient() |
| 222 | |
| 223 | allReqs, err := wm.GetAllRequests() |
| 224 | require.NoError(t, err) |
| 225 | |
| 226 | var matched []wmJournal.GetRequestResponse |
| 227 | for _, req := range allReqs.Requests { |
| 228 | if strings.Contains(req.Request.URL, "/messages:send") || strings.Contains(req.Request.AbsoluteURL, "/messages:send") { |
| 229 | if strings.Contains(req.Request.Body, messageID) { |
| 230 | matched = append(matched, req) |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | return matched |
| 236 | } |
| 237 | |
| 238 | func findWebhookRequests(t *testing.T, webhookPath string) []wmJournal.GetRequestResponse { |
| 239 | t.Helper() |
no test coverage detected