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

Function TestPushTypeVOIPHeader

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

Source from the content-addressed store, hash-verified

298}
299
300func TestPushTypeVOIPHeader(t *testing.T) {
301 n := mockNotification()
302 n.PushType = apns.PushTypeVOIP
303 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
304 assert.Equal(t, "voip", r.Header.Get("apns-push-type"))
305 }))
306 defer server.Close()
307 _, err := mockClient(server.URL).Push(n)
308 assert.NoError(t, err)
309}
310
311func TestPushTypeComplicationHeader(t *testing.T) {
312 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