(t *testing.T)
| 212 | } |
| 213 | |
| 214 | func TestClientPushWithNilContext(t *testing.T) { |
| 215 | n := mockNotification() |
| 216 | var apnsID = "02ABC856-EF8D-4E49-8F15-7B8A61D978D6" |
| 217 | server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 218 | w.Header().Set("Content-Type", "application/json; charset=utf-8") |
| 219 | w.Header().Set("apns-id", apnsID) |
| 220 | w.WriteHeader(http.StatusOK) |
| 221 | })) |
| 222 | defer server.Close() |
| 223 | |
| 224 | res, err := mockClient(server.URL).PushWithContext(nil, n) |
| 225 | assert.EqualError(t, err, "net/http: nil Context") |
| 226 | assert.Nil(t, res) |
| 227 | } |
| 228 | |
| 229 | func TestHeaders(t *testing.T) { |
| 230 | n := mockNotification() |
nothing calls this directly
no test coverage detected