aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/site_url_test.go
diff options
context:
space:
mode:
authorspf13 <[email protected]>2015-05-20 02:21:21 -0400
committerspf13 <[email protected]>2015-05-20 02:21:21 -0400
commita584ff207b4ee951e4b25cf5cedf6d261ee1bc47 (patch)
tree4273e35cfd90493ed0d25d53450285b61c527418 /hugolib/site_url_test.go
parent599d1b9786ddbaa9203aaca2c96ab33b40a583b1 (diff)
downloadhugo-a584ff207b4ee951e4b25cf5cedf6d261ee1bc47.tar.gz
hugo-a584ff207b4ee951e4b25cf5cedf6d261ee1bc47.zip
Stop Viper from leaking across many of the tests (now tests pass regardless of order tested)
Diffstat (limited to 'hugolib/site_url_test.go')
-rw-r--r--hugolib/site_url_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/hugolib/site_url_test.go b/hugolib/site_url_test.go
index c7fc64e44..f561369ff 100644
--- a/hugolib/site_url_test.go
+++ b/hugolib/site_url_test.go
@@ -4,12 +4,13 @@ import (
"path/filepath"
"testing"
+ "html/template"
+
"github.com/spf13/afero"
"github.com/spf13/hugo/hugofs"
"github.com/spf13/hugo/source"
"github.com/spf13/hugo/target"
"github.com/spf13/viper"
- "html/template"
)
const SLUG_DOC_1 = "---\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"
@@ -54,6 +55,8 @@ var urlFakeSource = []source.ByteSource{
// Issue #1105
func TestShouldNotAddTrailingSlashToBaseURL(t *testing.T) {
+ viper.Reset()
+ defer viper.Reset()
for i, this := range []struct {
in string
@@ -76,6 +79,9 @@ func TestShouldNotAddTrailingSlashToBaseURL(t *testing.T) {
}
func TestPageCount(t *testing.T) {
+ viper.Reset()
+ defer viper.Reset()
+
hugofs.DestinationFS = new(afero.MemMapFs)
viper.Set("uglyurls", false)