aboutsummaryrefslogtreecommitdiffhomepage
path: root/helpers/url_test.go
diff options
context:
space:
mode:
authorAlbert Nigmatzianov <[email protected]>2016-10-24 20:56:00 +0200
committerBjørn Erik Pedersen <[email protected]>2016-10-24 20:56:00 +0200
commitf21e2f25c99c547a2f35d209935f8f1c52fa2671 (patch)
treef2bb860213e88b0244c31144cfcd872665096f06 /helpers/url_test.go
parentd9f54a13c14f12ccc8af33e9dbd611c2cd113324 (diff)
downloadhugo-f21e2f25c99c547a2f35d209935f8f1c52fa2671.tar.gz
hugo-f21e2f25c99c547a2f35d209935f8f1c52fa2671.zip
all: Unify case of config variable names
All config variables starts with low-case and uses camelCase. If there is abbreviation at the beginning of the name, the whole abbreviation will be written in low-case. If there is abbreviation at the end of the name, the whole abbreviation will be written in upper-case. For example, rssURI.
Diffstat (limited to 'helpers/url_test.go')
-rw-r--r--helpers/url_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/helpers/url_test.go b/helpers/url_test.go
index 5394e9573..4072b40e2 100644
--- a/helpers/url_test.go
+++ b/helpers/url_test.go
@@ -62,10 +62,10 @@ func TestAbsURL(t *testing.T) {
func doTestAbsURL(t *testing.T, defaultInSubDir, addLanguage, multilingual bool, lang string) {
viper.Reset()
- viper.Set("Multilingual", multilingual)
- viper.Set("CurrentContentLanguage", NewLanguage(lang))
- viper.Set("DefaultContentLanguage", "en")
- viper.Set("DefaultContentLanguageInSubdir", defaultInSubDir)
+ viper.Set("multilingual", multilingual)
+ viper.Set("currentContentLanguage", NewLanguage(lang))
+ viper.Set("defaultContentLanguage", "en")
+ viper.Set("defaultContentLanguageInSubdir", defaultInSubDir)
tests := []struct {
input string
@@ -86,7 +86,7 @@ func doTestAbsURL(t *testing.T, defaultInSubDir, addLanguage, multilingual bool,
}
for _, test := range tests {
- viper.Set("BaseURL", test.baseURL)
+ viper.Set("baseURL", test.baseURL)
p := NewPathSpecFromConfig(viper.GetViper())
output := p.AbsURL(test.input, addLanguage)
expected := test.expected
@@ -136,10 +136,10 @@ func TestRelURL(t *testing.T) {
func doTestRelURL(t *testing.T, defaultInSubDir, addLanguage, multilingual bool, lang string) {
viper.Reset()
- viper.Set("Multilingual", multilingual)
- viper.Set("CurrentContentLanguage", NewLanguage(lang))
- viper.Set("DefaultContentLanguage", "en")
- viper.Set("DefaultContentLanguageInSubdir", defaultInSubDir)
+ viper.Set("multilingual", multilingual)
+ viper.Set("currentContentLanguage", NewLanguage(lang))
+ viper.Set("defaultContentLanguage", "en")
+ viper.Set("defaultContentLanguageInSubdir", defaultInSubDir)
tests := []struct {
input string
@@ -162,7 +162,7 @@ func doTestRelURL(t *testing.T, defaultInSubDir, addLanguage, multilingual bool,
}
for i, test := range tests {
- viper.Set("BaseURL", test.baseURL)
+ viper.Set("baseURL", test.baseURL)
viper.Set("canonifyURLs", test.canonify)
p := NewPathSpecFromConfig(viper.GetViper())