diff options
author | Cameron Moore <moorereason@gmail.com> | 2016-12-26 20:36:08 -0600 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-12-27 11:18:47 +0100 |
commit | 17f851780c79d0223b247dadcd8ddec0c74c4500 (patch) | |
tree | 44939ee0c17676a59a6f2278cbb5fd4867246266 /hugolib/node_as_page_test.go | |
parent | e78dd3cd4881ec8fb7acfc0400077d0ad8fcacb3 (diff) |
hugolib: Fix redundant URL file extension on taxonomy terms pages
Fixes #2819
Diffstat (limited to 'hugolib/node_as_page_test.go')
-rw-r--r-- | hugolib/node_as_page_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/hugolib/node_as_page_test.go b/hugolib/node_as_page_test.go index 5cca25fb5..9836d92a2 100644 --- a/hugolib/node_as_page_test.go +++ b/hugolib/node_as_page_test.go @@ -222,6 +222,19 @@ func doTestNodesWithNoContentFile(t *testing.T, ugly bool) { "Taxonomy Terms Title: Categories", ) + pages := s.findPagesByKind(KindTaxonomyTerm) + for _, p := range pages { + var want string + if ugly { + want = "/" + p.Site.pathSpec.URLize(p.Title) + ".html" + } else { + want = "/" + p.Site.pathSpec.URLize(p.Title) + "/" + } + if p.URL() != want { + t.Errorf("Taxonomy term URL mismatch: want %q, got %q", want, p.URL()) + } + } + // Sections assertFileContent(t, expectedFilePath(ugly, "public", "sect1"), false, "Section Title: Sect1s", |