hugolib: Test helper cleanup

This commit is contained in:
Bjørn Erik Pedersen
2017-02-17 20:52:50 +01:00
parent 10c13f5d79
commit ed847ed93d
14 changed files with 214 additions and 208 deletions

View File

@@ -25,7 +25,7 @@ func TestRSSOutput(t *testing.T) {
t.Parallel()
var (
cfg, fs = newTestCfg()
th = testHelper{cfg}
th = testHelper{cfg, fs, t}
)
rssLimit := len(weightedSources) - 1
@@ -44,11 +44,11 @@ func TestRSSOutput(t *testing.T) {
buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{})
// Home RSS
th.assertFileContent(t, fs, filepath.Join("public", rssURI), true, "<?xml", "rss version", "RSSTest")
th.assertFileContent(filepath.Join("public", rssURI), true, "<?xml", "rss version", "RSSTest")
// Section RSS
th.assertFileContent(t, fs, filepath.Join("public", "sect", rssURI), true, "<?xml", "rss version", "Sects on RSSTest")
th.assertFileContent(filepath.Join("public", "sect", rssURI), true, "<?xml", "rss version", "Sects on RSSTest")
// Taxonomy RSS
th.assertFileContent(t, fs, filepath.Join("public", "categories", "hugo", rssURI), true, "<?xml", "rss version", "Hugo on RSSTest")
th.assertFileContent(filepath.Join("public", "categories", "hugo", rssURI), true, "<?xml", "rss version", "Hugo on RSSTest")
// RSS Item Limit
content := readDestination(t, fs, filepath.Join("public", rssURI))