Upgrade and add new testing functions

This commit is contained in:
Zeni Kim 2026-09-13 00:09:50 -05:00
parent d12679df65
commit 9330ed8e74
13 changed files with 1867 additions and 130 deletions

View file

@ -66,6 +66,20 @@ func TestDeleteRequest(t *testing.T) {
}
}
func TestPatchRequest(t *testing.T) {
r := NewRouter()
handler := Controller(func(c *Context) *Response {
c.GetLogger().Info(TEST_STR)
return nil
})
r.Patch("/", handler)
route := r.GetRoutes()[0]
if route.Method != "patch" || route.Path != "/" {
t.Errorf("failed adding route with patch http method")
}
}
func TestPutRequest(t *testing.T) {
r := NewRouter()
handler := Controller(func(c *Context) *Response {