(t *testing.T)
| 69 | } |
| 70 | |
| 71 | func TestNewWithConfig(t *testing.T) { |
| 72 | e := NewWithConfig(Config{}) |
| 73 | req := httptest.NewRequest(http.MethodGet, "/", nil) |
| 74 | rec := httptest.NewRecorder() |
| 75 | |
| 76 | e.GET("/", func(c *Context) error { |
| 77 | return c.String(http.StatusTeapot, "Hello, World!") |
| 78 | }) |
| 79 | e.ServeHTTP(rec, req) |
| 80 | |
| 81 | assert.Equal(t, http.StatusTeapot, rec.Code) |
| 82 | assert.Equal(t, `Hello, World!`, rec.Body.String()) |
| 83 | } |
| 84 | |
| 85 | func TestNewDefaultFS(t *testing.T) { |
| 86 | tempDir := t.TempDir() |
nothing calls this directly
no test coverage detected
searching dependent graphs…