summaryrefslogtreecommitdiffstats
path: root/hugolib/handler_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-04-11 13:17:25 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-04-11 13:17:25 +0200
commitcd558958a0c0ecd06f7560a38e27334fe983e0de (patch)
treeb6840ee6381ed7b053fcdce22e2d27e6a6d9a400 /hugolib/handler_test.go
parent5ef52294f90c51697bd3f918b3c3ed83baff657a (diff)
Use Node.ID for anchor ID
Fixes #2057
Diffstat (limited to 'hugolib/handler_test.go')
-rw-r--r--hugolib/handler_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/hugolib/handler_test.go b/hugolib/handler_test.go
index 29b1161e4..e48d26932 100644
--- a/hugolib/handler_test.go
+++ b/hugolib/handler_test.go
@@ -25,8 +25,8 @@ import (
)
func TestDefaultHandler(t *testing.T) {
- viper.Reset()
- defer viper.Reset()
+ setUp()
+ defer tearDown()
hugofs.InitMemFs()
sources := []source.ByteSource{
@@ -63,14 +63,14 @@ func TestDefaultHandler(t *testing.T) {
doc string
expected string
}{
- {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/doc1.html"), "\n\n<h1 id=\"title:42\">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:28c75a9e2162b8eccda73a1ab9ce80b4\">doc3</h1>\n\n<p><em>some</em> content</p>\n"},
+ {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/doc3/img1.png"), string([]byte("‰PNG  ��� IHDR����������:~›U��� IDATWcø��ZMoñ����IEND®B`‚"))},
{filepath.FromSlash("sect/img2.gif"), string([]byte("GIF89a��€��ÿÿÿ���,�������D�;"))},
{filepath.FromSlash("sect/img2.spf"), string([]byte("****FAKE-FILETYPE****"))},
{filepath.FromSlash("doc7.html"), "<html><body>doc7 content</body></html>"},
- {filepath.FromSlash("sect/doc8.html"), "\n\n<h1 id=\"title:0ae308ad73e2f37bd09874105281b5d8\">title</h1>\n\n<p>some <em>content</em></p>\n"},
+ {filepath.FromSlash("sect/doc8.html"), "\n\n<h1 id=\"title:42\">title</h1>\n\n<p>some <em>content</em></p>\n"},
}
for _, test := range tests {