(t *testing.T)
| 87 | } |
| 88 | |
| 89 | func TestRouterMethod(t *testing.T) { |
| 90 | router := New() |
| 91 | router.PUT("/hey2", func(c *Context) { |
| 92 | c.String(http.StatusOK, "sup2") |
| 93 | }) |
| 94 | |
| 95 | router.PUT("/hey", func(c *Context) { |
| 96 | c.String(http.StatusOK, "called") |
| 97 | }) |
| 98 | |
| 99 | router.PUT("/hey3", func(c *Context) { |
| 100 | c.String(http.StatusOK, "sup3") |
| 101 | }) |
| 102 | |
| 103 | w := PerformRequest(router, http.MethodPut, "/hey") |
| 104 | |
| 105 | assert.Equal(t, http.StatusOK, w.Code) |
| 106 | assert.Equal(t, "called", w.Body.String()) |
| 107 | } |
| 108 | |
| 109 | func TestRouterGroupRouteOK(t *testing.T) { |
| 110 | testRouteOK(http.MethodGet, t) |
nothing calls this directly
no test coverage detected