mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Fix section menus for lazy blogger
IsMenuCurrent was always returning false for the top level entries. Fixes #2065
This commit is contained in:
@@ -435,9 +435,6 @@ func doTestSectionPagesMenu(canonifyUrls bool, t *testing.T) {
|
||||
assert.NotNil(t, fishySectionMenuEntry)
|
||||
assert.NotNil(t, nodeFishy)
|
||||
|
||||
firstSectionMenuEntry.URL = firstSectionMenuEntry.URL + "/"
|
||||
secondSectionMenuEntry.URL = secondSectionMenuEntry.URL + "/"
|
||||
fishySectionMenuEntry.URL = fishySectionMenuEntry.URL + "/"
|
||||
assert.True(t, nodeFirst.IsMenuCurrent("spm", firstSectionMenuEntry))
|
||||
assert.False(t, nodeFirst.IsMenuCurrent("spm", secondSectionMenuEntry))
|
||||
assert.False(t, nodeFirst.IsMenuCurrent("spm", fishySectionMenuEntry))
|
||||
|
Reference in New Issue
Block a user