Export Page.Layout

And at the same time rename and unexport the badly named `Layout()` func. That method is not very usable outside the package.

Fixes #1539
This commit is contained in:
Bjørn Erik Pedersen
2015-11-02 17:24:50 +01:00
parent e1729935b5
commit 5bda0398e7
5 changed files with 14 additions and 14 deletions

View File

@@ -502,8 +502,8 @@ func checkPageType(t *testing.T, page *Page, pageType string) {
}
func checkPageLayout(t *testing.T, page *Page, layout ...string) {
if !listEqual(page.Layout(), layout) {
t.Fatalf("Page layout is: %s. Expected: %s", page.Layout(), layout)
if !listEqual(page.layouts(), layout) {
t.Fatalf("Page layout is: %s. Expected: %s", page.layouts(), layout)
}
}
@@ -909,8 +909,8 @@ func TestLayoutOverride(t *testing.T) {
for _, y := range test.expectedLayout {
test.expectedLayout = append(test.expectedLayout, "theme/"+y)
}
if !listEqual(p.Layout(), test.expectedLayout) {
t.Errorf("Layout mismatch. Expected: %s, got: %s", test.expectedLayout, p.Layout())
if !listEqual(p.layouts(), test.expectedLayout) {
t.Errorf("Layout mismatch. Expected: %s, got: %s", test.expectedLayout, p.layouts())
}
}
}