summaryrefslogtreecommitdiffstats
path: root/hugolib/404_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-03-17 19:24:02 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-03-18 09:54:32 +0100
commitda88015776645cc68b96e8b94030c95905df53ae (patch)
tree8de419b68d715f03c097c97a2140f1869e40b5e3 /hugolib/404_test.go
parentdebd3663dd0a4dacf7dff01e2e602e58a4fa8ee7 (diff)
Spring test cleaning, take 2
Diffstat (limited to 'hugolib/404_test.go')
-rw-r--r--hugolib/404_test.go21
1 files changed, 5 insertions, 16 deletions
diff --git a/hugolib/404_test.go b/hugolib/404_test.go
index bbaed61d7..5ea98be62 100644
--- a/hugolib/404_test.go
+++ b/hugolib/404_test.go
@@ -14,30 +14,19 @@
package hugolib
import (
- "path/filepath"
-
"testing"
-
- "github.com/gohugoio/hugo/deps"
)
func Test404(t *testing.T) {
t.Parallel()
- var (
- cfg, fs = newTestCfg()
- th = testHelper{cfg, fs, t}
- )
-
- cfg.Set("baseURL", "http://auth/bub/")
-
- writeSource(t, fs, filepath.Join("layouts", "404.html"), "<html><body>Not Found!</body></html>")
- writeSource(t, fs, filepath.Join("content", "page.md"), "A page")
- buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{})
+ b := newTestSitesBuilder(t)
+ b.WithSimpleConfigFile().WithTemplatesAdded("404.html", "<html><body>Not Found!</body></html>")
+ b.Build(BuildCfg{})
// Note: We currently have only 1 404 page. One might think that we should have
- // multiple, to follow the Custom Output scheme, but I don't see how that wold work
+ // multiple, to follow the Custom Output scheme, but I don't see how that would work
// right now.
- th.assertFileContent("public/404.html", "Not Found")
+ b.AssertFileContent("public/404.html", "Not Found")
}