diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-02-17 20:52:50 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-02-17 20:52:50 +0100 |
commit | ed847ed93d86d0e1c0993adfee787e7fa02e604b (patch) | |
tree | fc85030e7109f3c1f8192bb417cba221f74342fe /hugolib/embedded_shortcodes_test.go | |
parent | 10c13f5d79e467796088cd305c8c3cb0fa7c0ee0 (diff) |
hugolib: Test helper cleanup
Diffstat (limited to 'hugolib/embedded_shortcodes_test.go')
-rw-r--r-- | hugolib/embedded_shortcodes_test.go | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/hugolib/embedded_shortcodes_test.go b/hugolib/embedded_shortcodes_test.go index a98ca1369..e9140f999 100644 --- a/hugolib/embedded_shortcodes_test.go +++ b/hugolib/embedded_shortcodes_test.go @@ -101,7 +101,7 @@ void do(); var ( cfg, fs = newTestCfg() - th = testHelper{cfg} + th = testHelper{cfg, fs, t} ) cfg.Set("pygmentsStyle", "bw") @@ -115,7 +115,7 @@ title: Shorty buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{}) - th.assertFileContentRegexp(t, fs, filepath.Join("public", "simple", "index.html"), false, this.expected) + th.assertFileContentRegexp(filepath.Join("public", "simple", "index.html"), false, this.expected) } } @@ -149,7 +149,7 @@ func TestShortcodeFigure(t *testing.T) { var ( cfg, fs = newTestCfg() - th = testHelper{cfg} + th = testHelper{cfg, fs, t} ) writeSource(t, fs, filepath.Join("content", "simple.md"), fmt.Sprintf(`--- @@ -160,7 +160,7 @@ title: Shorty buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{}) - th.assertFileContentRegexp(t, fs, filepath.Join("public", "simple", "index.html"), false, this.expected) + th.assertFileContentRegexp(filepath.Join("public", "simple", "index.html"), false, this.expected) } } @@ -179,7 +179,7 @@ func TestShortcodeSpeakerdeck(t *testing.T) { var ( cfg, fs = newTestCfg() - th = testHelper{cfg} + th = testHelper{cfg, fs, t} ) writeSource(t, fs, filepath.Join("content", "simple.md"), fmt.Sprintf(`--- @@ -190,7 +190,7 @@ title: Shorty buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{}) - th.assertFileContentRegexp(t, fs, filepath.Join("public", "simple", "index.html"), false, this.expected) + th.assertFileContentRegexp(filepath.Join("public", "simple", "index.html"), false, this.expected) } } @@ -217,7 +217,7 @@ func TestShortcodeYoutube(t *testing.T) { } { var ( cfg, fs = newTestCfg() - th = testHelper{cfg} + th = testHelper{cfg, fs, t} ) writeSource(t, fs, filepath.Join("content", "simple.md"), fmt.Sprintf(`--- @@ -228,7 +228,7 @@ title: Shorty buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{}) - th.assertFileContentRegexp(t, fs, filepath.Join("public", "simple", "index.html"), false, this.expected) + th.assertFileContentRegexp(filepath.Join("public", "simple", "index.html"), false, this.expected) } } @@ -256,7 +256,7 @@ func TestShortcodeVimeo(t *testing.T) { } { var ( cfg, fs = newTestCfg() - th = testHelper{cfg} + th = testHelper{cfg, fs, t} ) writeSource(t, fs, filepath.Join("content", "simple.md"), fmt.Sprintf(`--- @@ -267,7 +267,7 @@ title: Shorty buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{}) - th.assertFileContentRegexp(t, fs, filepath.Join("public", "simple", "index.html"), false, this.expected) + th.assertFileContentRegexp(filepath.Join("public", "simple", "index.html"), false, this.expected) } } @@ -289,7 +289,7 @@ func TestShortcodeGist(t *testing.T) { } { var ( cfg, fs = newTestCfg() - th = testHelper{cfg} + th = testHelper{cfg, fs, t} ) writeSource(t, fs, filepath.Join("content", "simple.md"), fmt.Sprintf(`--- @@ -300,7 +300,7 @@ title: Shorty buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{}) - th.assertFileContentRegexp(t, fs, filepath.Join("public", "simple", "index.html"), false, this.expected) + th.assertFileContentRegexp(filepath.Join("public", "simple", "index.html"), false, this.expected) } } @@ -332,7 +332,7 @@ func TestShortcodeTweet(t *testing.T) { var ( cfg, fs = newTestCfg() - th = testHelper{cfg} + th = testHelper{cfg, fs, t} ) withTemplate := func(templ tpl.Template) error { @@ -348,7 +348,7 @@ title: Shorty buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg, WithTemplate: withTemplate}, BuildCfg{}) - th.assertFileContentRegexp(t, fs, filepath.Join("public", "simple", "index.html"), false, this.expected) + th.assertFileContentRegexp(filepath.Join("public", "simple", "index.html"), false, this.expected) } } @@ -387,7 +387,7 @@ func TestShortcodeInstagram(t *testing.T) { var ( cfg, fs = newTestCfg() - th = testHelper{cfg} + th = testHelper{cfg, fs, t} ) withTemplate := func(templ tpl.Template) error { @@ -403,7 +403,7 @@ title: Shorty buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg, WithTemplate: withTemplate}, BuildCfg{}) - th.assertFileContentRegexp(t, fs, filepath.Join("public", "simple", "index.html"), false, this.expected) + th.assertFileContentRegexp(filepath.Join("public", "simple", "index.html"), false, this.expected) } } |