aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/site_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2018-03-15 09:37:30 +0100
committerBjørn Erik Pedersen <[email protected]>2018-03-16 10:10:01 +0100
commitffaec4ca8c4c6fd05b195879ccd65acf2fd5a6ac (patch)
tree28d4a68d5b41d5ccd769208856d0e3b4f086ebe5 /hugolib/site_test.go
parent91fb8f1b59cce50de914d66dac1d406655c3c43b (diff)
downloadhugo-ffaec4ca8c4c6fd05b195879ccd65acf2fd5a6ac.tar.gz
hugo-ffaec4ca8c4c6fd05b195879ccd65acf2fd5a6ac.zip
Add a way to merge pages by language
As an example: ```html {{ $pages := .Site.RegularPages | lang.Merge $frSite.RegularPages | lang.Merge $enSite.RegularPages }} ``` Will "fill in the gaps" in the current site with, from left to right, content from the French site, and lastly the English. Fixes #4463
Diffstat (limited to 'hugolib/site_test.go')
-rw-r--r--hugolib/site_test.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/hugolib/site_test.go b/hugolib/site_test.go
index c157ee6d2..7286c4c36 100644
--- a/hugolib/site_test.go
+++ b/hugolib/site_test.go
@@ -20,7 +20,6 @@ import (
"testing"
"github.com/markbates/inflect"
- jww "github.com/spf13/jwalterweatherman"
"github.com/gohugoio/hugo/helpers"
@@ -54,16 +53,8 @@ func TestRenderWithInvalidTemplate(t *testing.T) {
withTemplate := createWithTemplateFromNameValues("missing", templateMissingFunc)
- s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg, WithTemplate: withTemplate}, BuildCfg{})
+ buildSingleSiteExpected(t, true, deps.DepsCfg{Fs: fs, Cfg: cfg, WithTemplate: withTemplate}, BuildCfg{})
- errCount := s.Log.LogCountForLevelsGreaterThanorEqualTo(jww.LevelError)
-
- // TODO(bep) clean up the template error handling
- // The template errors are stored in a slice etc. so we get 4 log entries
- // When we should get only 1
- if errCount == 0 {
- t.Fatalf("Expecting the template to log 1 ERROR, got %d", errCount)
- }
}
func TestDraftAndFutureRender(t *testing.T) {