summaryrefslogtreecommitdiffstats
path: root/hugolib/site_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-04-12 18:11:24 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-04-12 18:11:24 +0200
commit39c9ae3108fa1a36f0e2581e6235058ebdea6137 (patch)
treebae1337066656ef0107edd7f35a9126efa1d6543 /hugolib/site_test.go
parent2468b10eb35ee3e9871a25416ca0bf627caae851 (diff)
Revert "Use Node.ID for anchor ID"
Diffstat (limited to 'hugolib/site_test.go')
-rw-r--r--hugolib/site_test.go17
1 files changed, 7 insertions, 10 deletions
diff --git a/hugolib/site_test.go b/hugolib/site_test.go
index 55e7b5299..9f0abc98c 100644
--- a/hugolib/site_test.go
+++ b/hugolib/site_test.go
@@ -142,9 +142,6 @@ func NopCloser(w io.Writer) io.WriteCloser {
}
func TestRenderThing(t *testing.T) {
- setUp()
- defer tearDown()
-
tests := []struct {
content string
template string
@@ -152,7 +149,7 @@ func TestRenderThing(t *testing.T) {
}{
{pageSimpleTitle, templateTitle, "simple template"},
{pageSimpleTitle, templateFunc, "simple-template"},
- {pageWithMd, templateContent, "\n\n<h1 id=\"heading-1:42\">heading 1</h1>\n\n<p>text</p>\n\n<h2 id=\"heading-2:42\">heading 2</h2>\n\n<p>more text</p>\n"},
+ {pageWithMd, templateContent, "\n\n<h1 id=\"heading-1:91b5c4a22fc6103c73bb91e4a40568f8\">heading 1</h1>\n\n<p>text</p>\n\n<h2 id=\"heading-2:91b5c4a22fc6103c73bb91e4a40568f8\">heading 2</h2>\n\n<p>more text</p>\n"},
{simplePageRFC3339Date, templateDate, "2013-05-17 16:59:30 &#43;0000 UTC"},
}
@@ -559,8 +556,8 @@ func doTestSectionNaming(t *testing.T, canonify, uglify, pluralize bool) {
}
func TestSkipRender(t *testing.T) {
- setUp()
- defer tearDown()
+ viper.Reset()
+ defer viper.Reset()
hugofs.InitMemFs()
sources := []source.ByteSource{
@@ -596,14 +593,14 @@ func TestSkipRender(t *testing.T) {
doc string
expected string
}{
- {filepath.FromSlash("sect/doc1.html"), "\n\n<h1 id=\"title:42\">title</h1>\n\n<p>some <em>content</em></p>\n"},
+ {filepath.FromSlash("sect/doc1.html"), "\n\n<h1 id=\"title:5d74edbb89ef198cd37882b687940cda\">title</h1>\n\n<p>some <em>content</em></p>\n"},
{filepath.FromSlash("sect/doc2.html"), "<!doctype html><html><body>more content</body></html>"},
- {filepath.FromSlash("sect/doc3.html"), "\n\n<h1 id=\"doc3:42\">doc3</h1>\n\n<p><em>some</em> content</p>\n"},
- {filepath.FromSlash("sect/doc4.html"), "\n\n<h1 id=\"doc4:42\">doc4</h1>\n\n<p><em>some content</em></p>\n"},
+ {filepath.FromSlash("sect/doc3.html"), "\n\n<h1 id=\"doc3:28c75a9e2162b8eccda73a1ab9ce80b4\">doc3</h1>\n\n<p><em>some</em> content</p>\n"},
+ {filepath.FromSlash("sect/doc4.html"), "\n\n<h1 id=\"doc4:f8e6806123f341b8975509637645a4d3\">doc4</h1>\n\n<p><em>some content</em></p>\n"},
{filepath.FromSlash("sect/doc5.html"), "<!doctype html><html><head><script src=\"script.js\"></script></head><body>body5</body></html>"},
{filepath.FromSlash("sect/doc6.html"), "<!doctype html><html><head><script src=\"http://auth/bub/script.js\"></script></head><body>body5</body></html>"},
{filepath.FromSlash("doc7.html"), "<html><body>doc7 content</body></html>"},
- {filepath.FromSlash("sect/doc8.html"), "\n\n<h1 id=\"title:42\">title</h1>\n\n<p>some <em>content</em></p>\n"},
+ {filepath.FromSlash("sect/doc8.html"), "\n\n<h1 id=\"title:0ae308ad73e2f37bd09874105281b5d8\">title</h1>\n\n<p>some <em>content</em></p>\n"},
}
for _, test := range tests {