summaryrefslogtreecommitdiffstats
path: root/hugolib/site_url_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-07-26 10:24:27 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-09-06 18:32:16 +0300
commit75dd596e6c38466fcb97a8b9dc9eb20fc2fb7fd6 (patch)
tree37f43d8af433033996fbae9d2b3914888144c60a /hugolib/site_url_test.go
parent618948e4a83665f8355b01d8a3f7a7186e6bd3eb (diff)
Introduce HugoSites type
And a Hugo global variable which contains the site under build. This is really needed to get some level of control of the "multiple languages" in play. There are still work related to this scattered around, but that will come. With this commit, the multilingual feature is starting to work.
Diffstat (limited to 'hugolib/site_url_test.go')
-rw-r--r--hugolib/site_url_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/hugolib/site_url_test.go b/hugolib/site_url_test.go
index 6e011a500..fc0203d4d 100644
--- a/hugolib/site_url_test.go
+++ b/hugolib/site_url_test.go
@@ -73,7 +73,7 @@ func TestShouldNotAddTrailingSlashToBaseURL(t *testing.T) {
{"http://base.com", "http://base.com"}} {
viper.Set("BaseURL", this.in)
- s := &Site{}
+ s := newSiteDefaultLang()
s.initializeSiteInfo()
if s.Info.BaseURL != template.URL(this.expected) {
@@ -93,6 +93,7 @@ func TestPageCount(t *testing.T) {
viper.Set("paginate", 10)
s := &Site{
Source: &source.InMemorySource{ByteSource: urlFakeSource},
+ Lang: newDefaultLanguage(),
}
s.initializeSiteInfo()
s.prepTemplates("indexes/blue.html", indexTemplate)