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

@@ -1,10 +1,12 @@
package hugolib
import (
"github.com/spf13/hugo/source"
"github.com/spf13/hugo/target"
"html/template"
"testing"
"github.com/spf13/hugo/source"
"github.com/spf13/hugo/target"
"github.com/spf13/viper"
)
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"
@@ -51,10 +53,11 @@ func TestPageCount(t *testing.T) {
files := make(map[string][]byte)
target := &target.InMemoryTarget{Files: files}
alias := &InMemoryAliasTarget{files: files}
viper.Set("uglyurls", false)
s := &Site{
Target: target,
Alias: alias,
Config: Config{UglyUrls: false},
Source: &source.InMemorySource{ByteSource: urlFakeSource},
}
s.initializeSiteInfo()