summaryrefslogtreecommitdiffstats
path: root/hugolib/page_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-07-13 15:01:41 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-07-13 18:06:36 +0200
commit4da672af888cbd0db79463bf456b5210ad9a463d (patch)
tree8f9a5a0a853f8961abfa62b1bfadaa70200d4205 /hugolib/page_test.go
parentf1886f8c379851c45f947efd2a10424cddd338c5 (diff)
Return error when .Render is invoked without arg
Fixes #11243
Diffstat (limited to 'hugolib/page_test.go')
-rw-r--r--hugolib/page_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/hugolib/page_test.go b/hugolib/page_test.go
index 162f26052..5237b6340 100644
--- a/hugolib/page_test.go
+++ b/hugolib/page_test.go
@@ -1983,3 +1983,25 @@ title: "p2"
b.Assert(identity.HashString(p1), qt.Not(qt.Equals), identity.HashString(p2))
b.Assert(identity.HashString(sites[0]), qt.Not(qt.Equals), identity.HashString(sites[1]))
}
+
+// Issue #11243
+func TestRenderWithoutArgument(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- hugo.toml --
+-- layouts/index.html --
+{{ .Render }}
+`
+
+ b, err := NewIntegrationTestBuilder(
+ IntegrationTestConfig{
+ T: t,
+ TxtarString: files,
+ Running: true,
+ },
+ ).BuildE()
+
+ b.Assert(err, qt.IsNotNil)
+
+}