From f21e2f25c99c547a2f35d209935f8f1c52fa2671 Mon Sep 17 00:00:00 2001 From: Albert Nigmatzianov Date: Mon, 24 Oct 2016 20:56:00 +0200 Subject: 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. --- helpers/path_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'helpers/path_test.go') diff --git a/helpers/path_test.go b/helpers/path_test.go index ef0c16505..049499108 100644 --- a/helpers/path_test.go +++ b/helpers/path_test.go @@ -34,7 +34,7 @@ import ( ) func initCommonTestConfig() { - viper.Set("CurrentContentLanguage", NewLanguage("en")) + viper.Set("currentContentLanguage", NewLanguage("en")) } func TestMakePath(t *testing.T) { @@ -61,7 +61,7 @@ func TestMakePath(t *testing.T) { } for _, test := range tests { - viper.Set("RemovePathAccents", test.removeAccents) + viper.Set("removePathAccents", test.removeAccents) p := NewPathSpecFromConfig(viper.GetViper()) output := p.MakePath(test.input) if output != test.expected { @@ -102,7 +102,7 @@ func TestMakePathSanitizedDisablePathToLower(t *testing.T) { defer viper.Reset() initCommonTestConfig() - viper.Set("DisablePathToLower", true) + viper.Set("disablePathToLower", true) p := NewPathSpecFromConfig(viper.GetViper()) tests := []struct { @@ -549,7 +549,7 @@ func TestAbsPathify(t *testing.T) { for i, d := range data { viper.Reset() // todo see comment in AbsPathify - viper.Set("WorkingDir", d.workingDir) + viper.Set("workingDir", d.workingDir) expected := AbsPathify(d.inPath) if d.expected != expected { @@ -559,7 +559,7 @@ func TestAbsPathify(t *testing.T) { t.Logf("Running platform specific path tests for %s", runtime.GOOS) if runtime.GOOS == "windows" { for i, d := range windowsData { - viper.Set("WorkingDir", d.workingDir) + viper.Set("workingDir", d.workingDir) expected := AbsPathify(d.inPath) if d.expected != expected { @@ -568,7 +568,7 @@ func TestAbsPathify(t *testing.T) { } } else { for i, d := range unixData { - viper.Set("WorkingDir", d.workingDir) + viper.Set("workingDir", d.workingDir) expected := AbsPathify(d.inPath) if d.expected != expected { -- cgit v1.2.3