summaryrefslogtreecommitdiffstats
path: root/hugolib/sitemap_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 /hugolib/sitemap_test.go
parent6027ee11082d0b9d72de1d4d1980a702be294ad2 (diff)
tests: Convert from testify to quicktest
Diffstat (limited to 'hugolib/sitemap_test.go')
-rw-r--r--hugolib/sitemap_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/hugolib/sitemap_test.go b/hugolib/sitemap_test.go
index 5aba6f09d..4dfb61ecd 100644
--- a/hugolib/sitemap_test.go
+++ b/hugolib/sitemap_test.go
@@ -18,10 +18,10 @@ import (
"reflect"
+ qt "github.com/frankban/quicktest"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/tpl"
- "github.com/stretchr/testify/require"
)
const sitemapTemplate = `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
@@ -44,6 +44,7 @@ func TestSitemapOutput(t *testing.T) {
func doTestSitemapOutput(t *testing.T, internal bool) {
+ c := qt.New(t)
cfg, fs := newTestCfg()
cfg.Set("baseURL", "http://auth/bub/")
@@ -63,7 +64,7 @@ func doTestSitemapOutput(t *testing.T, internal bool) {
writeSourcesToSource(t, "content", fs, weightedSources...)
s := buildSingleSite(t, depsCfg, BuildCfg{})
- th := testHelper{s.Cfg, s.Fs, t}
+ th := newTestHelper(s.Cfg, s.Fs, t)
outputSitemap := "public/sitemap.xml"
th.assertFileContent(outputSitemap,
@@ -79,8 +80,8 @@ func doTestSitemapOutput(t *testing.T, internal bool) {
"<loc>http://auth/bub/categories/hugo/</loc>",
)
- content := readDestination(th.T, th.Fs, outputSitemap)
- require.NotContains(t, content, "404")
+ content := readDestination(th, th.Fs, outputSitemap)
+ c.Assert(content, qt.Not(qt.Contains), "404")
}