()
| 189 | } |
| 190 | |
| 191 | func (s *ServerTestSuite) TestIntoSuccess() { |
| 192 | mockHandler := func(reqID string, rw server.ResponseWriter, r *http.Request) *server.Error { |
| 193 | rw.WriteHeader(http.StatusOK) |
| 194 | return nil |
| 195 | } |
| 196 | |
| 197 | s.router().GET("/test", s.router().WithReportError(mockHandler)) |
| 198 | |
| 199 | req := httptest.NewRequest(http.MethodGet, "/test", nil) |
| 200 | rw := httptest.NewRecorder() |
| 201 | |
| 202 | s.router().ServeHTTP(rw, req) |
| 203 | |
| 204 | s.Equal(http.StatusOK, rw.Code) |
| 205 | } |
| 206 | |
| 207 | func (s *ServerTestSuite) TestIntoWithError() { |
| 208 | testError := errctx.NewTextError("test error", 0) |
nothing calls this directly
no test coverage detected