(t *testing.T)
| 7820 | } |
| 7821 | |
| 7822 | func Test_Ctx_RenderWithOverwrittenViewBind(t *testing.T) { |
| 7823 | t.Parallel() |
| 7824 | app := New() |
| 7825 | c := app.AcquireCtx(&fasthttp.RequestCtx{}) |
| 7826 | |
| 7827 | err := c.ViewBind(Map{ |
| 7828 | "Title": "Hello, World!", |
| 7829 | }) |
| 7830 | require.NoError(t, err) |
| 7831 | |
| 7832 | err = c.Render("./.github/testdata/index.tmpl", Map{ |
| 7833 | "Title": "Hello from Fiber!", |
| 7834 | }) |
| 7835 | require.NoError(t, err) |
| 7836 | |
| 7837 | buf := bytebufferpool.Get() |
| 7838 | buf.WriteString("overwrite") |
| 7839 | defer bytebufferpool.Put(buf) |
| 7840 | |
| 7841 | require.Equal(t, "<h1>Hello from Fiber!</h1>", string(c.Response().Body())) |
| 7842 | } |
| 7843 | |
| 7844 | func Test_Ctx_RenderWithViewBindLocals(t *testing.T) { |
| 7845 | t.Parallel() |
nothing calls this directly
no test coverage detected