summaryrefslogtreecommitdiffstats
path: root/hugolib/embedded_shortcodes_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/embedded_shortcodes_test.go
parent6027ee11082d0b9d72de1d4d1980a702be294ad2 (diff)
tests: Convert from testify to quicktest
Diffstat (limited to 'hugolib/embedded_shortcodes_test.go')
-rw-r--r--hugolib/embedded_shortcodes_test.go21
1 files changed, 11 insertions, 10 deletions
diff --git a/hugolib/embedded_shortcodes_test.go b/hugolib/embedded_shortcodes_test.go
index 8056b9842..a6f38d8f7 100644
--- a/hugolib/embedded_shortcodes_test.go
+++ b/hugolib/embedded_shortcodes_test.go
@@ -26,8 +26,8 @@ import (
"github.com/gohugoio/hugo/deps"
+ qt "github.com/frankban/quicktest"
"github.com/gohugoio/hugo/tpl"
- "github.com/stretchr/testify/require"
)
const (
@@ -45,6 +45,7 @@ func TestShortcodeCrossrefs(t *testing.T) {
func doTestShortcodeCrossrefs(t *testing.T, relative bool) {
var (
cfg, fs = newTestCfg()
+ c = qt.New(t)
)
cfg.Set("baseURL", testBaseURL)
@@ -69,10 +70,10 @@ func doTestShortcodeCrossrefs(t *testing.T, relative bool) {
s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{})
- require.Len(t, s.RegularPages(), 1)
+ c.Assert(len(s.RegularPages()), qt.Equals, 1)
content, err := s.RegularPages()[0].Content()
- require.NoError(t, err)
+ c.Assert(err, qt.IsNil)
output := cast.ToString(content)
if !strings.Contains(output, expected) {
@@ -100,7 +101,7 @@ void do();
var (
cfg, fs = newTestCfg()
- th = testHelper{cfg, fs, t}
+ th = newTestHelper(cfg, fs, t)
)
cfg.Set("pygmentsStyle", "bw")
@@ -148,7 +149,7 @@ func TestShortcodeFigure(t *testing.T) {
var (
cfg, fs = newTestCfg()
- th = testHelper{cfg, fs, t}
+ th = newTestHelper(cfg, fs, t)
)
writeSource(t, fs, filepath.Join("content", "simple.md"), fmt.Sprintf(`---
@@ -187,7 +188,7 @@ func TestShortcodeYoutube(t *testing.T) {
} {
var (
cfg, fs = newTestCfg()
- th = testHelper{cfg, fs, t}
+ th = newTestHelper(cfg, fs, t)
)
writeSource(t, fs, filepath.Join("content", "simple.md"), fmt.Sprintf(`---
@@ -226,7 +227,7 @@ func TestShortcodeVimeo(t *testing.T) {
} {
var (
cfg, fs = newTestCfg()
- th = testHelper{cfg, fs, t}
+ th = newTestHelper(cfg, fs, t)
)
writeSource(t, fs, filepath.Join("content", "simple.md"), fmt.Sprintf(`---
@@ -259,7 +260,7 @@ func TestShortcodeGist(t *testing.T) {
} {
var (
cfg, fs = newTestCfg()
- th = testHelper{cfg, fs, t}
+ th = newTestHelper(cfg, fs, t)
)
writeSource(t, fs, filepath.Join("content", "simple.md"), fmt.Sprintf(`---
@@ -302,7 +303,7 @@ func TestShortcodeTweet(t *testing.T) {
var (
cfg, fs = newTestCfg()
- th = testHelper{cfg, fs, t}
+ th = newTestHelper(cfg, fs, t)
)
withTemplate := func(templ tpl.TemplateHandler) error {
@@ -357,7 +358,7 @@ func TestShortcodeInstagram(t *testing.T) {
var (
cfg, fs = newTestCfg()
- th = testHelper{cfg, fs, t}
+ th = newTestHelper(cfg, fs, t)
)
withTemplate := func(templ tpl.TemplateHandler) error {