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

Function TestPushTypeComplicationHeader

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

Source from the content-addressed store, hash-verified

309}
310
311func TestPushTypeComplicationHeader(t *testing.T) {
312 n := mockNotification()
313 n.PushType = apns.PushTypeComplication
314 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
315 assert.Equal(t, "complication", r.Header.Get("apns-push-type"))
316 }))
317 defer server.Close()
318 _, err := mockClient(server.URL).Push(n)
319 assert.NoError(t, err)
320}
321
322func TestPushTypeFileProviderHeader(t *testing.T) {
323 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