diff options
author | Bjørn Erik Pedersen <[email protected]> | 2019-08-10 21:05:17 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-08-12 13:26:32 +0200 |
commit | 9e571827055dedb46b78c5db3d17d6913f14870b (patch) | |
tree | f5f0108afe0c9385ff6dc27664943d9f719f57ad /modules/collect_test.go | |
parent | 6027ee11082d0b9d72de1d4d1980a702be294ad2 (diff) | |
download | hugo-9e571827055dedb46b78c5db3d17d6913f14870b.tar.gz hugo-9e571827055dedb46b78c5db3d17d6913f14870b.zip |
tests: Convert from testify to quicktest
Diffstat (limited to 'modules/collect_test.go')
-rw-r--r-- | modules/collect_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/collect_test.go b/modules/collect_test.go index 63410ddb1..7f320f40a 100644 --- a/modules/collect_test.go +++ b/modules/collect_test.go @@ -16,11 +16,11 @@ package modules import ( "testing" - "github.com/stretchr/testify/require" + qt "github.com/frankban/quicktest" ) func TestPathKey(t *testing.T) { - assert := require.New(t) + c := qt.New(t) for _, test := range []struct { in string @@ -32,7 +32,7 @@ func TestPathKey(t *testing.T) { {"github.com/foo/v3d", "github.com/foo/v3d"}, {"MyTheme", "mytheme"}, } { - assert.Equal(test.expect, pathKey(test.in)) + c.Assert(pathKey(test.in), qt.Equals, test.expect) } } @@ -47,8 +47,8 @@ func TestFilterUnwantedMounts(t *testing.T) { filtered := filterUnwantedMounts(mounts) - assert := require.New(t) - assert.Len(filtered, 2) - assert.Equal([]Mount{Mount{Source: "a", Target: "b", Lang: "en"}, Mount{Source: "b", Target: "c", Lang: "en"}}, filtered) + c := qt.New(t) + c.Assert(len(filtered), qt.Equals, 2) + c.Assert(filtered, qt.DeepEquals, []Mount{Mount{Source: "a", Target: "b", Lang: "en"}, Mount{Source: "b", Target: "c", Lang: "en"}}) } |