mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 23:02:19 -05:00
parent
ab70e6f52f
commit
78f9bf2444
1 changed files with 6 additions and 0 deletions
|
@ -44,6 +44,10 @@ const (
|
||||||
name = "ext"
|
name = "ext"
|
||||||
url = "http://gohugo.io"
|
url = "http://gohugo.io"
|
||||||
identifier = "ext"
|
identifier = "ext"
|
||||||
|
[[menu.main]]
|
||||||
|
name = "ext2"
|
||||||
|
url = "http://foo.local/Zoo/foo"
|
||||||
|
identifier = "ext2"
|
||||||
[[menu.grandparent]]
|
[[menu.grandparent]]
|
||||||
name = "grandparent"
|
name = "grandparent"
|
||||||
url = "/grandparent"
|
url = "/grandparent"
|
||||||
|
@ -313,6 +317,7 @@ func TestPageMenu(t *testing.T) {
|
||||||
func TestMenuURL(t *testing.T) {
|
func TestMenuURL(t *testing.T) {
|
||||||
viper.Reset()
|
viper.Reset()
|
||||||
defer viper.Reset()
|
defer viper.Reset()
|
||||||
|
|
||||||
s := setupMenuTests(t, MENU_PAGE_SOURCES)
|
s := setupMenuTests(t, MENU_PAGE_SOURCES)
|
||||||
|
|
||||||
for i, this := range []struct {
|
for i, this := range []struct {
|
||||||
|
@ -323,6 +328,7 @@ func TestMenuURL(t *testing.T) {
|
||||||
{findTestMenuEntryByID(s, "hash", "hash"), "/Zoo/resource#anchor"},
|
{findTestMenuEntryByID(s, "hash", "hash"), "/Zoo/resource#anchor"},
|
||||||
// issue #1774
|
// issue #1774
|
||||||
{findTestMenuEntryByID(s, "main", "ext"), "http://gohugo.io"},
|
{findTestMenuEntryByID(s, "main", "ext"), "http://gohugo.io"},
|
||||||
|
{findTestMenuEntryByID(s, "main", "ext2"), "http://foo.local/Zoo/foo"},
|
||||||
} {
|
} {
|
||||||
|
|
||||||
if this.me == nil {
|
if this.me == nil {
|
||||||
|
|
Loading…
Reference in a new issue