node to page: Handle aliases, 404, robots.txt, sitemap

Updates #2297
This commit is contained in:
Bjørn Erik Pedersen
2016-11-08 23:34:52 +01:00
parent ec2d502b4f
commit bde1bfd34a
9 changed files with 181 additions and 192 deletions

View File

@@ -477,10 +477,10 @@ func TestTaxonomyNodeMenu(t *testing.T) {
&MenuEntry{Name: "Somewhere else", URL: "/somewhereelse"}, false, false},
} {
n, _ := s.newTaxonomyNode(true, this.taxInfo, i)
p := s.newTaxonomyPage(this.taxInfo.plural, this.taxInfo.key)
isMenuCurrent := n.IsMenuCurrent(this.menu, this.menuItem)
hasMenuCurrent := n.HasMenuCurrent(this.menu, this.menuItem)
isMenuCurrent := p.IsMenuCurrent(this.menu, this.menuItem)
hasMenuCurrent := p.HasMenuCurrent(this.menu, this.menuItem)
if isMenuCurrent != this.isMenuCurrent {
t.Errorf("[%d] Wrong result from IsMenuCurrent: %v", i, isMenuCurrent)