(t *testing.T)
| 281 | } |
| 282 | |
| 283 | func Test_Domain_Head(t *testing.T) { |
| 284 | t.Parallel() |
| 285 | |
| 286 | app := New() |
| 287 | |
| 288 | app.Domain("api.example.com").Head("/test", func(c Ctx) error { |
| 289 | c.Set("X-Custom", "head") |
| 290 | return c.SendStatus(StatusOK) |
| 291 | }) |
| 292 | |
| 293 | req := httptest.NewRequest(MethodHead, "/test", http.NoBody) |
| 294 | req.Host = "api.example.com" |
| 295 | resp, err := app.Test(req) |
| 296 | require.NoError(t, err) |
| 297 | require.Equal(t, StatusOK, resp.StatusCode) |
| 298 | } |
| 299 | |
| 300 | func Test_Domain_All(t *testing.T) { |
| 301 | t.Parallel() |