MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / findFCMRequests

Function findFCMRequests

tests/helpers_test.go:219–236  ·  view source on GitHub ↗
(t *testing.T, messageID string)

Source from the content-addressed store, hash-verified

217}
218
219func 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
238func findWebhookRequests(t *testing.T, webhookPath string) []wmJournal.GetRequestResponse {
239 t.Helper()

Callers 1

waitForFCMPushFunction · 0.85

Calls 1

newWireMockClientFunction · 0.85

Tested by

no test coverage detected