diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2015-06-28 10:43:43 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2015-06-28 10:43:43 +0200 |
commit | 664a97819f8eea0e1da399148958fe7a2ae2c8cc (patch) | |
tree | 8e94825c69a12784f2b2f82035fa83980c5fa47d /hugolib/site_test.go | |
parent | 50df31406fe4cb7fcc857f9689101ce65794e255 (diff) |
404 is homeless
Fixes #1235
Diffstat (limited to 'hugolib/site_test.go')
-rw-r--r-- | hugolib/site_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hugolib/site_test.go b/hugolib/site_test.go index 5acff8c2a..6ee9287cf 100644 --- a/hugolib/site_test.go +++ b/hugolib/site_test.go @@ -398,9 +398,9 @@ func doTest404ShouldAlwaysHaveUglyUrls(t *testing.T, uglyURLs bool) { s.initializeSiteInfo() templatePrep(s) - must(s.addTemplate("index.html", "Home Sweet Home")) - must(s.addTemplate("_default/single.html", "{{.Content}}")) - must(s.addTemplate("404.html", "Page Not Found")) + must(s.addTemplate("index.html", "Home Sweet Home. IsHome={{ .IsHome }}")) + must(s.addTemplate("_default/single.html", "{{.Content}} IsHome={{ .IsHome }}")) + must(s.addTemplate("404.html", "Page Not Found. IsHome={{ .IsHome }}")) // make sure the XML files also end up with ugly urls must(s.addTemplate("rss.xml", "<root>RSS</root>")) @@ -421,9 +421,9 @@ func doTest404ShouldAlwaysHaveUglyUrls(t *testing.T, uglyURLs bool) { doc string expected string }{ - {filepath.FromSlash("index.html"), "Home Sweet Home"}, - {filepath.FromSlash(expectedPagePath), "\n\n<h1 id=\"title:5d74edbb89ef198cd37882b687940cda\">title</h1>\n\n<p>some <em>content</em></p>\n"}, - {filepath.FromSlash("404.html"), "Page Not Found"}, + {filepath.FromSlash("index.html"), "Home Sweet Home. IsHome=true"}, + {filepath.FromSlash(expectedPagePath), "\n\n<h1 id=\"title:5d74edbb89ef198cd37882b687940cda\">title</h1>\n\n<p>some <em>content</em></p>\n IsHome=false"}, + {filepath.FromSlash("404.html"), "Page Not Found. IsHome=false"}, {filepath.FromSlash("index.xml"), "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>\n<root>RSS</root>"}, {filepath.FromSlash("sitemap.xml"), "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>\n<root>SITEMAP</root>"}, } |