diff options
Diffstat (limited to 'tpl/debug/debug_integration_test.go')
-rw-r--r-- | tpl/debug/debug_integration_test.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tpl/debug/debug_integration_test.go b/tpl/debug/debug_integration_test.go index 9a36e2d12..52f0a427c 100644 --- a/tpl/debug/debug_integration_test.go +++ b/tpl/debug/debug_integration_test.go @@ -43,3 +43,33 @@ disableKinds = ["taxonomy", "term"] b.AssertLogContains("timer: name foo count 5 duration") } + +func TestDebugDumpPage(t *testing.T) { + files := ` +-- hugo.toml -- +baseURL = "https://example.org/" +disableLiveReload = true +[taxonomies] +tag = "tags" +-- content/_index.md -- +--- +title: "The Index" +date: 2012-03-15 +--- +-- content/p1.md -- +--- +title: "The First" +tags: ["a", "b"] +--- +-- layouts/_default/list.html -- +Dump: {{ debug.Dump . | safeHTML }} +Dump Site: {{ debug.Dump site }} +Dum site.Taxonomies: {{ debug.Dump site.Taxonomies | safeHTML }} +-- layouts/_default/single.html -- +Dump: {{ debug.Dump . | safeHTML }} + + +` + b := hugolib.TestRunning(t, files) + b.AssertFileContent("public/index.html", "Dump: {\n \"Date\": \"2012-03-15T00:00:00Z\"") +} |