From 9e571827055dedb46b78c5db3d17d6913f14870b Mon Sep 17 00:00:00 2001 From: Bjørn Erik Pedersen Date: Sat, 10 Aug 2019 21:05:17 +0200 Subject: tests: Convert from testify to quicktest --- source/filesystem_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/filesystem_test.go') 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) -- cgit v1.2.3