hugolib: Add a simple test for jsonify of Site

Closes #5780
This commit is contained in:
Bjørn Erik Pedersen 2019-03-28 09:45:25 +01:00
parent bb533ca5e1
commit 8bfd3a54a4
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -23,7 +23,9 @@ import (
func TestEncodePage(t *testing.T) {
t.Parallel()
templ := `{{ index .Site.RegularPages 0 | jsonify }}`
templ := `Page: |{{ index .Site.RegularPages 0 | jsonify }}|
Site: {{ site | jsonify }}
`
b := newTestSitesBuilder(t)
b.WithSimpleConfigFile().WithTemplatesAdded("index.html", templ)