(t *testing.T)
| 97 | } |
| 98 | |
| 99 | func TestHEAD(t *testing.T) { |
| 100 | HEAD("/head", func(c *gin.Context) { |
| 101 | c.String(http.StatusOK, "head") |
| 102 | }) |
| 103 | |
| 104 | req := httptest.NewRequest(http.MethodHead, "/head", nil) |
| 105 | w := httptest.NewRecorder() |
| 106 | engine().ServeHTTP(w, req) |
| 107 | |
| 108 | assert.Equal(t, http.StatusOK, w.Code) |
| 109 | } |
| 110 | |
| 111 | func TestAny(t *testing.T) { |
| 112 | Any("/any", func(c *gin.Context) { |