(t *testing.T)
| 71 | } |
| 72 | |
| 73 | func TestPATCH(t *testing.T) { |
| 74 | PATCH("/patch", func(c *gin.Context) { |
| 75 | c.String(http.StatusOK, "patched") |
| 76 | }) |
| 77 | |
| 78 | req := httptest.NewRequest(http.MethodPatch, "/patch", nil) |
| 79 | w := httptest.NewRecorder() |
| 80 | engine().ServeHTTP(w, req) |
| 81 | |
| 82 | assert.Equal(t, http.StatusOK, w.Code) |
| 83 | assert.Equal(t, "patched", w.Body.String()) |
| 84 | } |
| 85 | |
| 86 | func TestOPTIONS(t *testing.T) { |
| 87 | OPTIONS("/options", func(c *gin.Context) { |