diff --git a/router_test.go b/router_test.go index fe7d0735..bb0289e0 100644 --- a/router_test.go +++ b/router_test.go @@ -214,6 +214,21 @@ func Test_Ensure_Router_Interface_Implementation(t *testing.T) { utils.AssertEqual(t, true, ok) } +func Test_Router_Handler_SetETag(t *testing.T) { + app := New() + app.Settings.ETag = true + + app.Get("/", func(c *Ctx) { + c.Send("Hello, World!") + }) + + c := &fasthttp.RequestCtx{} + + app.handler(c) + + utils.AssertEqual(t, `"13-1831710635"`, string(c.Response.Header.Peek(HeaderETag))) +} + ////////////////////////////////////////////// ///////////////// BENCHMARKS ///////////////// //////////////////////////////////////////////