summaryrefslogtreecommitdiffstats
path: root/helpers/path_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 /helpers/path_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 'helpers/path_test.go')
-rw-r--r--helpers/path_test.go12
1 files changed, 6 insertions, 6 deletions
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 {