summaryrefslogtreecommitdiffstats
path: root/source/filesystem_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-10 21:05:17 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-12 13:26:32 +0200
commit9e571827055dedb46b78c5db3d17d6913f14870b (patch)
treef5f0108afe0c9385ff6dc27664943d9f719f57ad /source/filesystem_test.go
parent6027ee11082d0b9d72de1d4d1980a702be294ad2 (diff)
downloadhugo-9e571827055dedb46b78c5db3d17d6913f14870b.tar.gz
hugo-9e571827055dedb46b78c5db3d17d6913f14870b.zip
tests: Convert from testify to quicktest
Diffstat (limited to 'source/filesystem_test.go')
-rw-r--r--source/filesystem_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/filesystem_test.go b/source/filesystem_test.go
index fd3ff1952..ec7a305dc 100644
--- a/source/filesystem_test.go
+++ b/source/filesystem_test.go
@@ -25,19 +25,19 @@ import (
"github.com/spf13/afero"
+ qt "github.com/frankban/quicktest"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
- "github.com/stretchr/testify/require"
"github.com/spf13/viper"
)
func TestEmptySourceFilesystem(t *testing.T) {
- assert := require.New(t)
+ c := qt.New(t)
ss := newTestSourceSpec()
src := ss.NewFilesystem("")
files, err := src.Files()
- assert.NoError(err)
+ c.Assert(err, qt.IsNil)
if len(files) != 0 {
t.Errorf("new filesystem should contain 0 files.")
}
@@ -49,7 +49,7 @@ func TestUnicodeNorm(t *testing.T) {
return
}
- assert := require.New(t)
+ c := qt.New(t)
paths := []struct {
NFC string
@@ -64,11 +64,11 @@ func TestUnicodeNorm(t *testing.T) {
for i, path := range paths {
base := fmt.Sprintf("base%d", i)
- assert.NoError(afero.WriteFile(ss.Fs.Source, filepath.Join(base, path.NFD), []byte("some data"), 0777))
+ c.Assert(afero.WriteFile(ss.Fs.Source, filepath.Join(base, path.NFD), []byte("some data"), 0777), qt.IsNil)
src := ss.NewFilesystem(base)
_ = src.add(path.NFD, fi)
files, err := src.Files()
- assert.NoError(err)
+ c.Assert(err, qt.IsNil)
f := files[0]
if f.BaseFileName() != path.NFC {
t.Fatalf("file %q name in NFD form should be normalized (%s)", f.BaseFileName(), path.NFC)