summaryrefslogtreecommitdiffhomepage
path: root/hugolib/site_url_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2017-04-07 18:33:28 +0200
committerBjørn Erik Pedersen <[email protected]>2017-04-07 20:18:31 +0200
commit7b2e1b0be986545f2f137d79c54cd8beff3ce966 (patch)
treeddde4c517b071c50162e9758de2a039dc60b38e5 /hugolib/site_url_test.go
parente975a07fb0db8f1926186ff810b8aa1e6db80206 (diff)
downloadhugo-7b2e1b0be986545f2f137d79c54cd8beff3ce966.tar.gz
hugo-7b2e1b0be986545f2f137d79c54cd8beff3ce966.zip
hubolib: Do not add missing trailing slash to command line baseURL
This makes it consistent with how it behaves when it's set in config.toml. This commit also unifies BaseURL in Site.Info so we now have one source for this value. Fixes #3262
Diffstat (limited to 'hugolib/site_url_test.go')
-rw-r--r--hugolib/site_url_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/site_url_test.go b/hugolib/site_url_test.go
index 6f75846e7..b655ff11c 100644
--- a/hugolib/site_url_test.go
+++ b/hugolib/site_url_test.go
@@ -57,8 +57,8 @@ func TestShouldNotAddTrailingSlashToBaseURL(t *testing.T) {
require.NoError(t, err)
s.initializeSiteInfo()
- if s.Info.BaseURL != template.URL(this.expected) {
- t.Errorf("[%d] got %s expected %s", i, s.Info.BaseURL, this.expected)
+ if s.Info.BaseURL() != template.URL(this.expected) {
+ t.Errorf("[%d] got %s expected %s", i, s.Info.BaseURL(), this.expected)
}
}
}