(t *testing.T)
| 7535 | } |
| 7536 | |
| 7537 | func Test_Ctx_RenderWithoutLocals(t *testing.T) { |
| 7538 | t.Parallel() |
| 7539 | app := New(Config{ |
| 7540 | PassLocalsToViews: false, |
| 7541 | }) |
| 7542 | c := app.AcquireCtx(&fasthttp.RequestCtx{}) |
| 7543 | |
| 7544 | c.Locals("Title", "Hello, World!") |
| 7545 | |
| 7546 | err := c.Render("./.github/testdata/index.tmpl", Map{}) |
| 7547 | require.NoError(t, err) |
| 7548 | require.Equal(t, "<h1></h1>", string(c.Response().Body())) |
| 7549 | } |
| 7550 | |
| 7551 | func Test_Ctx_RenderWithLocals(t *testing.T) { |
| 7552 | t.Parallel() |