diff options
Diffstat (limited to 'tpl/templates/integration_test.go')
-rw-r--r-- | tpl/templates/integration_test.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tpl/templates/integration_test.go b/tpl/templates/integration_test.go index fea2d7f6e..d6ea9228d 100644 --- a/tpl/templates/integration_test.go +++ b/tpl/templates/integration_test.go @@ -83,3 +83,29 @@ post/doesnotexist.html: false `) } + + +// See #10774 +func TestPageFunctionExists(t *testing.T) { + t.Parallel() + + files := ` +-- config.toml -- +baseURL = 'http://example.com/' +-- layouts/index.html -- +Home: {{ page.IsHome }} + +` + + b := hugolib.NewIntegrationTestBuilder( + hugolib.IntegrationTestConfig{ + T: t, + TxtarString: files, + }, + ).Build() + + b.AssertFileContent("public/index.html", ` +Home: true + +`) +} |