summaryrefslogtreecommitdiffstats
path: root/helpers/path_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-01-10 10:55:03 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-02-04 11:37:25 +0700
commitc71e1b106e6011d148cac899f83c4685dee33a22 (patch)
treec5c7090f0c2398c7771e4908ebcc97aa7714ffd2 /helpers/path_test.go
parent0ada40591216572b0e4c6a8ab986b0aa4fb13c13 (diff)
all: Refactor to nonglobal file systems
Updates #2701 Fixes #2951
Diffstat (limited to 'helpers/path_test.go')
-rw-r--r--helpers/path_test.go8
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