diff options
author | Bjørn Erik Pedersen <[email protected]> | 2017-01-10 10:55:03 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2017-02-04 11:37:25 +0700 |
commit | c71e1b106e6011d148cac899f83c4685dee33a22 (patch) | |
tree | c5c7090f0c2398c7771e4908ebcc97aa7714ffd2 /helpers/path_test.go | |
parent | 0ada40591216572b0e4c6a8ab986b0aa4fb13c13 (diff) | |
download | hugo-c71e1b106e6011d148cac899f83c4685dee33a22.tar.gz hugo-c71e1b106e6011d148cac899f83c4685dee33a22.zip |
all: Refactor to nonglobal file systems
Updates #2701
Fixes #2951
Diffstat (limited to 'helpers/path_test.go')
-rw-r--r-- | helpers/path_test.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/helpers/path_test.go b/helpers/path_test.go index f1407fb15..4d1ac28aa 100644 --- a/helpers/path_test.go +++ b/helpers/path_test.go @@ -30,6 +30,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/spf13/afero" + "github.com/spf13/hugo/hugofs" "github.com/spf13/viper" ) @@ -64,7 +65,8 @@ func TestMakePath(t *testing.T) { for _, test := range tests { viper.Set("removePathAccents", test.removeAccents) - p := NewPathSpecFromConfig(viper.GetViper()) + p := NewPathSpec(hugofs.NewMem(), viper.GetViper()) + output := p.MakePath(test.input) if output != test.expected { t.Errorf("Expected %#v, got %#v\n", test.expected, output) @@ -77,7 +79,7 @@ func TestMakePathSanitized(t *testing.T) { defer viper.Reset() initCommonTestConfig() - p := NewPathSpecFromConfig(viper.GetViper()) + p := NewPathSpec(hugofs.NewMem(), viper.GetViper()) tests := []struct { input string @@ -105,7 +107,7 @@ func TestMakePathSanitizedDisablePathToLower(t *testing.T) { initCommonTestConfig() viper.Set("disablePathToLower", true) - p := NewPathSpecFromConfig(viper.GetViper()) + p := NewPathSpec(hugofs.NewMem(), viper.GetViper()) tests := []struct { input string |