MCPcopy
hub / github.com/sideshow/apns2 / TestPushTypeAlertHeader

Function TestPushTypeAlertHeader

client_test.go:267–276  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

265}
266
267func TestPushTypeAlertHeader(t *testing.T) {
268 n := mockNotification()
269 n.PushType = apns.PushTypeAlert
270 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
271 assert.Equal(t, "alert", r.Header.Get("apns-push-type"))
272 }))
273 defer server.Close()
274 _, err := mockClient(server.URL).Push(n)
275 assert.NoError(t, err)
276}
277
278func TestPushTypeBackgroundHeader(t *testing.T) {
279 n := mockNotification()

Callers

nothing calls this directly

Calls 4

mockNotificationFunction · 0.85
mockClientFunction · 0.85
GetMethod · 0.80
PushMethod · 0.80

Tested by

no test coverage detected