aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/alias_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-08-10 21:05:17 +0200
committerBjørn Erik Pedersen <[email protected]>2019-08-12 13:26:32 +0200
commit9e571827055dedb46b78c5db3d17d6913f14870b (patch)
treef5f0108afe0c9385ff6dc27664943d9f719f57ad /hugolib/alias_test.go
parent6027ee11082d0b9d72de1d4d1980a702be294ad2 (diff)
downloadhugo-9e571827055dedb46b78c5db3d17d6913f14870b.tar.gz
hugo-9e571827055dedb46b78c5db3d17d6913f14870b.zip
tests: Convert from testify to quicktest
Diffstat (limited to 'hugolib/alias_test.go')
-rw-r--r--hugolib/alias_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/hugolib/alias_test.go b/hugolib/alias_test.go
index 095ae1be2..b0491c13e 100644
--- a/hugolib/alias_test.go
+++ b/hugolib/alias_test.go
@@ -20,7 +20,7 @@ import (
"github.com/gohugoio/hugo/common/loggers"
- "github.com/stretchr/testify/require"
+ qt "github.com/frankban/quicktest"
)
const pageWithAlias = `---
@@ -43,14 +43,14 @@ const aliasTemplate = "<html><body>ALIASTEMPLATE</body></html>"
func TestAlias(t *testing.T) {
t.Parallel()
- assert := require.New(t)
+ c := qt.New(t)
b := newTestSitesBuilder(t)
b.WithSimpleConfigFile().WithContent("blog/page.md", pageWithAlias)
b.CreateSites().Build(BuildCfg{})
- assert.Equal(1, len(b.H.Sites))
- require.Len(t, b.H.Sites[0].RegularPages(), 1)
+ c.Assert(len(b.H.Sites), qt.Equals, 1)
+ c.Assert(len(b.H.Sites[0].RegularPages()), qt.Equals, 1)
// the real page
b.AssertFileContent("public/blog/page/index.html", "For some moments the old man")
@@ -62,7 +62,7 @@ func TestAlias(t *testing.T) {
func TestAliasMultipleOutputFormats(t *testing.T) {
t.Parallel()
- assert := require.New(t)
+ c := qt.New(t)
b := newTestSitesBuilder(t)
b.WithSimpleConfigFile().WithContent("blog/page.md", pageWithAliasMultipleOutputs)
@@ -82,7 +82,7 @@ func TestAliasMultipleOutputFormats(t *testing.T) {
// the alias redirectors
b.AssertFileContent("public/foo/bar/index.html", "<meta http-equiv=\"refresh\" content=\"0; ")
b.AssertFileContent("public/amp/foo/bar/index.html", "<meta http-equiv=\"refresh\" content=\"0; ")
- assert.False(b.CheckExists("public/foo/bar/index.json"))
+ c.Assert(b.CheckExists("public/foo/bar/index.json"), qt.Equals, false)
}
func TestAliasTemplate(t *testing.T) {