hugolib: Add test case for empty Pages in regular pages
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 17 Feb 2017 16:26:09 +0000 (17:26 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 17 Feb 2017 16:26:09 +0000 (17:26 +0100)
Fixes #2947

hugolib/hugo_sites_build_test.go

index ccc056d110478947da5a596282f19f43209b3b46..6be0ab9dca4196c2e6f65b1e84db8a07545973fe 100644 (file)
@@ -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) {