TestGroupSetNotFoundHandleReturnsGroup tests that SetNotFoundHandle returns the Group for chaining
(t *testing.T)
| 148 | |
| 149 | // TestGroupSetNotFoundHandleReturnsGroup tests that SetNotFoundHandle returns the Group for chaining |
| 150 | func TestGroupSetNotFoundHandleReturnsGroup(t *testing.T) { |
| 151 | app := New() |
| 152 | |
| 153 | group := app.HttpServer.Group("/api") |
| 154 | result := group.SetNotFoundHandle(func(ctx Context) { |
| 155 | ctx.WriteString("404") |
| 156 | }) |
| 157 | |
| 158 | if result == nil { |
| 159 | t.Error("SetNotFoundHandle should return Group for chaining") |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | // test helper |
| 164 | type testHttpWriter http.Header |
nothing calls this directly
no test coverage detected