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

Function TestPushTypeLocationHeader

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

Source from the content-addressed store, hash-verified

287}
288
289func TestPushTypeLocationHeader(t *testing.T) {
290 n := mockNotification()
291 n.PushType = apns.PushTypeLocation
292 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
293 assert.Equal(t, "location", r.Header.Get("apns-push-type"))
294 }))
295 defer server.Close()
296 _, err := mockClient(server.URL).Push(n)
297 assert.NoError(t, err)
298}
299
300func TestPushTypeVOIPHeader(t *testing.T) {
301 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