From: Bjørn Erik Pedersen Date: Fri, 17 Feb 2017 16:26:09 +0000 (+0100) Subject: hugolib: Add test case for empty Pages in regular pages X-Git-Tag: v0.19~65 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=53d07fb4;p=brevno-suite%2Fhugo hugolib: Add test case for empty Pages in regular pages Fixes #2947 --- diff --git a/hugolib/hugo_sites_build_test.go b/hugolib/hugo_sites_build_test.go index ccc056d1..6be0ab9d 100644 --- a/hugolib/hugo_sites_build_test.go +++ b/hugolib/hugo_sites_build_test.go @@ -685,6 +685,10 @@ title = "Svenska" require.Len(t, svPage.AllTranslations(), 3) require.Equal(t, "en", svPage.Translations()[0].Lang()) + // Regular pages have no children + require.Len(t, svPage.Pages, 0) + require.Len(t, svPage.Data["Pages"], 0) + } func TestChangeDefaultLanguage(t *testing.T) {