Functional Tests
(t *testing.T)
| 150 | // Functional Tests |
| 151 | |
| 152 | func TestURL(t *testing.T) { |
| 153 | n := mockNotification() |
| 154 | server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 155 | assert.Equal(t, "POST", r.Method) |
| 156 | assert.Equal(t, fmt.Sprintf("/3/device/%s", n.DeviceToken), r.URL.String()) |
| 157 | })) |
| 158 | defer server.Close() |
| 159 | _, err := mockClient(server.URL).Push(n) |
| 160 | assert.NoError(t, err) |
| 161 | } |
| 162 | |
| 163 | func TestDefaultHeaders(t *testing.T) { |
| 164 | n := mockNotification() |
nothing calls this directly
no test coverage detected