Add one more menu test
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 14 Jan 2016 16:30:05 +0000 (17:30 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 14 Jan 2016 16:30:05 +0000 (17:30 +0100)
See #1774

hugolib/menu_test.go

index 49a5b5c6dbbe1745b3d755f4f06d70920c0c029a..33fa0a25feb9a8d241c3990b78115b2ecb8bc623 100644 (file)
@@ -44,6 +44,10 @@ const (
     name = "ext"
     url = "http://gohugo.io"
        identifier = "ext"
+[[menu.main]]
+    name = "ext2"
+    url = "http://foo.local/Zoo/foo"
+       identifier = "ext2"
 [[menu.grandparent]]
        name = "grandparent"
        url = "/grandparent"
@@ -313,6 +317,7 @@ func TestPageMenu(t *testing.T) {
 func TestMenuURL(t *testing.T) {
        viper.Reset()
        defer viper.Reset()
+
        s := setupMenuTests(t, MENU_PAGE_SOURCES)
 
        for i, this := range []struct {
@@ -323,6 +328,7 @@ func TestMenuURL(t *testing.T) {
                {findTestMenuEntryByID(s, "hash", "hash"), "/Zoo/resource#anchor"},
                // issue #1774
                {findTestMenuEntryByID(s, "main", "ext"), "http://gohugo.io"},
+               {findTestMenuEntryByID(s, "main", "ext2"), "http://foo.local/Zoo/foo"},
        } {
 
                if this.me == nil {