mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
Stop Viper from leaking across many of the tests (now tests pass regardless of order tested)
This commit is contained in:
@@ -10,6 +10,9 @@ import (
|
||||
const SITE_INFO_PARAM_TEMPLATE = `{{ .Site.Params.MyGlobalParam }}`
|
||||
|
||||
func TestSiteInfoParams(t *testing.T) {
|
||||
viper.Reset()
|
||||
defer viper.Reset()
|
||||
|
||||
viper.Set("Params", map[string]interface{}{"MyGlobalParam": "FOOBAR_PARAM"})
|
||||
s := &Site{}
|
||||
|
||||
@@ -32,6 +35,9 @@ func TestSiteInfoParams(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSiteInfoPermalinks(t *testing.T) {
|
||||
viper.Reset()
|
||||
defer viper.Reset()
|
||||
|
||||
viper.Set("Permalinks", map[string]interface{}{"section": "/:title"})
|
||||
s := &Site{}
|
||||
|
||||
|
Reference in New Issue
Block a user