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

Function TestPushTypeBackgroundHeader

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

Source from the content-addressed store, hash-verified

276}
277
278func TestPushTypeBackgroundHeader(t *testing.T) {
279 n := mockNotification()
280 n.PushType = apns.PushTypeBackground
281 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
282 assert.Equal(t, "background", r.Header.Get("apns-push-type"))
283 }))
284 defer server.Close()
285 _, err := mockClient(server.URL).Push(n)
286 assert.NoError(t, err)
287}
288
289func TestPushTypeLocationHeader(t *testing.T) {
290 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