aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/site_url_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/site_url_test.go')
-rw-r--r--hugolib/site_url_test.go20
1 files changed, 3 insertions, 17 deletions
diff --git a/hugolib/site_url_test.go b/hugolib/site_url_test.go
index fd15eb5d3..2cc532854 100644
--- a/hugolib/site_url_test.go
+++ b/hugolib/site_url_test.go
@@ -23,20 +23,6 @@ import (
"github.com/gohugoio/hugo/resources/kinds"
)
-const slugDoc1 = "---\ntitle: slug doc 1\nslug: slug-doc-1\naliases:\n - /sd1/foo/\n - /sd2\n - /sd3/\n - /sd4.html\n---\nslug doc 1 content\n"
-
-const slugDoc2 = `---
-title: slug doc 2
-slug: slug-doc-2
----
-slug doc 2 content
-`
-
-var urlFakeSource = [][2]string{
- {filepath.FromSlash("content/blue/doc1.md"), slugDoc1},
- {filepath.FromSlash("content/blue/doc2.md"), slugDoc2},
-}
-
func TestUglyURLsPerSection(t *testing.T) {
t.Parallel()
@@ -67,12 +53,12 @@ Do not go gentle into that good night.
c.Assert(len(s.RegularPages()), qt.Equals, 2)
- notUgly := s.getPage(kinds.KindPage, "sect1/p1.md")
+ notUgly := s.getPageOldVersion(kinds.KindPage, "sect1/p1.md")
c.Assert(notUgly, qt.Not(qt.IsNil))
c.Assert(notUgly.Section(), qt.Equals, "sect1")
c.Assert(notUgly.RelPermalink(), qt.Equals, "/sect1/p1/")
- ugly := s.getPage(kinds.KindPage, "sect2/p2.md")
+ ugly := s.getPageOldVersion(kinds.KindPage, "sect2/p2.md")
c.Assert(ugly, qt.Not(qt.IsNil))
c.Assert(ugly.Section(), qt.Equals, "sect2")
c.Assert(ugly.RelPermalink(), qt.Equals, "/sect2/p2.html")
@@ -124,7 +110,7 @@ Do not go gentle into that good night.
c.Assert(len(s.RegularPages()), qt.Equals, 10)
- sect1 := s.getPage(kinds.KindSection, "sect1")
+ sect1 := s.getPageOldVersion(kinds.KindSection, "sect1")
c.Assert(sect1, qt.Not(qt.IsNil))
c.Assert(sect1.RelPermalink(), qt.Equals, "/ss1/")
th.assertFileContent(filepath.Join("public", "ss1", "index.html"), "P1|URL: /ss1/|Next: /ss1/page/2/")