1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

Fixing all tests to pass with new Viper Config

This commit is contained in:
spf13
2014-04-07 11:44:13 -04:00
parent 62dd1d45c1
commit 9a83f7a01b
6 changed files with 37 additions and 31 deletions

View File

@@ -3,14 +3,15 @@ package hugolib
import (
"bytes"
"testing"
"github.com/spf13/viper"
)
const SITE_INFO_PARAM_TEMPLATE = `{{ .Site.Params.MyGlobalParam }}`
func TestSiteInfoParams(t *testing.T) {
s := &Site{
Config: Config{Params: map[string]interface{}{"MyGlobalParam": "FOOBAR_PARAM"}},
}
viper.Set("Params", map[string]interface{}{"MyGlobalParam": "FOOBAR_PARAM"})
s := &Site{}
s.initialize()
if s.Info.Params["MyGlobalParam"] != "FOOBAR_PARAM" {