diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-08-10 21:05:17 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-08-12 13:26:32 +0200 |
commit | 9e571827055dedb46b78c5db3d17d6913f14870b (patch) | |
tree | f5f0108afe0c9385ff6dc27664943d9f719f57ad /hugolib/disableKinds_test.go | |
parent | 6027ee11082d0b9d72de1d4d1980a702be294ad2 (diff) |
tests: Convert from testify to quicktest
Diffstat (limited to 'hugolib/disableKinds_test.go')
-rw-r--r-- | hugolib/disableKinds_test.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/hugolib/disableKinds_test.go b/hugolib/disableKinds_test.go index c191dfef1..b26385cc3 100644 --- a/hugolib/disableKinds_test.go +++ b/hugolib/disableKinds_test.go @@ -18,10 +18,10 @@ import ( "fmt" + qt "github.com/frankban/quicktest" "github.com/gohugoio/hugo/resources/page" "github.com/gohugoio/hugo/helpers" - "github.com/stretchr/testify/require" ) func TestDisableKindsNoneDisabled(t *testing.T) { @@ -104,8 +104,6 @@ categories: b.Build(BuildCfg{}) h := b.H - require.Len(t, h.Sites, 1) - assertDisabledKinds(b, h.Sites[0], disabled...) } @@ -181,7 +179,7 @@ func assertDisabledKinds(b *sitesBuilder, s *Site, disabled ...string) { func assertDisabledKind(b *sitesBuilder, kindAssert func(bool) bool, disabled []string, kind, path, matcher string) { isDisabled := stringSliceContains(kind, disabled...) - require.True(b.T, kindAssert(isDisabled), fmt.Sprintf("%s: %t", kind, isDisabled)) + b.Assert(kindAssert(isDisabled), qt.Equals, true) if kind == kindRSS && !isDisabled { // If the home page is also disabled, there is not RSS to look for. @@ -193,8 +191,8 @@ func assertDisabledKind(b *sitesBuilder, kindAssert func(bool) bool, disabled [] if isDisabled { // Path should not exist fileExists, err := helpers.Exists(path, b.Fs.Destination) - require.False(b.T, fileExists) - require.NoError(b.T, err) + b.Assert(err, qt.IsNil) + b.Assert(fileExists, qt.Equals, false) } else { b.AssertFileContent(path, matcher) |