summaryrefslogtreecommitdiffstats
path: root/hugolib/menu_test.go
diff options
context:
space:
mode:
authorAlbert Nigmatzianov <albertnigma@gmail.com>2016-10-24 20:56:00 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-10-24 20:56:00 +0200
commitf21e2f25c99c547a2f35d209935f8f1c52fa2671 (patch)
treef2bb860213e88b0244c31144cfcd872665096f06 /hugolib/menu_test.go
parentd9f54a13c14f12ccc8af33e9dbd611c2cd113324 (diff)
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 'hugolib/menu_test.go')
-rw-r--r--hugolib/menu_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/hugolib/menu_test.go b/hugolib/menu_test.go
index 5ca8af8e5..38bcd1c05 100644
--- a/hugolib/menu_test.go
+++ b/hugolib/menu_test.go
@@ -376,7 +376,7 @@ func TestMenuWithUnicodeURLs(t *testing.T) {
func doTestMenuWithUnicodeURLs(t *testing.T, canonifyURLs bool) {
testCommonResetState()
- viper.Set("CanonifyURLs", canonifyURLs)
+ viper.Set("canonifyURLs", canonifyURLs)
s := setupMenuTests(t, menuPageSources)
@@ -398,12 +398,12 @@ func TestSectionPagesMenu(t *testing.T) {
doTestSectionPagesMenu(false, t)
}
-func doTestSectionPagesMenu(canonifyUrls bool, t *testing.T) {
+func doTestSectionPagesMenu(canonifyURLs bool, t *testing.T) {
testCommonResetState()
- viper.Set("SectionPagesMenu", "spm")
+ viper.Set("sectionPagesMenu", "spm")
- viper.Set("CanonifyURLs", canonifyUrls)
+ viper.Set("canonifyURLs", canonifyURLs)
s := setupMenuTests(t, menuPageSectionsSources)
assert.Equal(t, 3, len(s.Sections))
@@ -459,7 +459,7 @@ func doTestSectionPagesMenu(canonifyUrls bool, t *testing.T) {
func TestTaxonomyNodeMenu(t *testing.T) {
testCommonResetState()
- viper.Set("CanonifyURLs", true)
+ viper.Set("canonifyURLs", true)
s := setupMenuTests(t, menuPageSources)
for i, this := range []struct {
@@ -544,8 +544,8 @@ func TestMenuSortByN(t *testing.T) {
func TestHomeNodeMenu(t *testing.T) {
testCommonResetState()
- viper.Set("CanonifyURLs", true)
- viper.Set("UglyURLs", true)
+ viper.Set("canonifyURLs", true)
+ viper.Set("uglyURLs", true)
s := setupMenuTests(t, menuPageSources)
@@ -660,11 +660,11 @@ func setupTestMenuState(t *testing.T) {
menus, err := tomlToMap(confMenu1)
if err != nil {
- t.Fatalf("Unable to Read menus: %v", err)
+ t.Fatalf("Unable to read menus: %v", err)
}
viper.Set("menu", menus["menu"])
- viper.Set("baseurl", "http://foo.local/Zoo/")
+ viper.Set("baseURL", "http://foo.local/Zoo/")
}
func setupMenuTests(t *testing.T, pageSources []source.ByteSource) *Site {