Refactor layout resolve to a descriptor/adapter pattern

This commit is contained in:
Bjørn Erik Pedersen
2017-03-16 08:58:50 +01:00
parent 4c2abe0015
commit ad8cea87f3
5 changed files with 44 additions and 84 deletions

View File

@@ -1361,7 +1361,6 @@ func TestIndexPageSimpleMethods(t *testing.T) {
{func(n *Page) bool { return n.Scratch() != nil }},
{func(n *Page) bool { return n.Hugo() != nil }},
{func(n *Page) bool { return n.Now().Unix() == time.Now().Unix() }},
{func(n *Page) bool { return n.layoutIdentifier.Kind == KindHome }},
} {
n := s.newHomePage()