summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorCameron Moore <moorereason@gmail.com>2016-05-07 16:34:53 -0500
committerCameron Moore <moorereason@gmail.com>2016-06-25 17:57:05 -0500
commite2aea65170985d7428c468ce0591557ad95af884 (patch)
tree2c7e21e00b2b57f829426a690442095e46e73483 /source
parent29ca323a34e8f6e673c70a1af9c9f95a916229bd (diff)
helpers: Remove ToReader funcs
Remove StringToReader and BytesToReader in favor of using the stdlib directly.
Diffstat (limited to 'source')
-rw-r--r--source/file_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/file_test.go b/source/file_test.go
index 43165b2c3..bbf51f748 100644
--- a/source/file_test.go
+++ b/source/file_test.go
@@ -14,9 +14,10 @@
package source
import (
- "github.com/spf13/hugo/helpers"
- "github.com/stretchr/testify/assert"
+ "strings"
"testing"
+
+ "github.com/stretchr/testify/assert"
)
func TestFileUniqueID(t *testing.T) {
@@ -28,11 +29,11 @@ func TestFileUniqueID(t *testing.T) {
}
func TestFileString(t *testing.T) {
- assert.Equal(t, "abc", NewFileWithContents("a", helpers.StringToReader("abc")).String())
+ assert.Equal(t, "abc", NewFileWithContents("a", strings.NewReader("abc")).String())
assert.Equal(t, "", NewFile("a").String())
}
func TestFileBytes(t *testing.T) {
- assert.Equal(t, []byte("abc"), NewFileWithContents("a", helpers.StringToReader("abc")).Bytes())
+ assert.Equal(t, []byte("abc"), NewFileWithContents("a", strings.NewReader("abc")).Bytes())
assert.Equal(t, []byte(""), NewFile("a").Bytes())
}