(t *testing.T)
| 276 | } |
| 277 | |
| 278 | func 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 | |
| 289 | func TestPushTypeLocationHeader(t *testing.T) { |
| 290 | n := mockNotification() |
nothing calls this directly
no test coverage detected