mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
testing: Simplify some integration tests
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
)
|
||||
|
||||
func TestGroupByLocalizedDate(t *testing.T) {
|
||||
|
||||
files := `
|
||||
-- config.toml --
|
||||
defaultContentLanguage = 'en'
|
||||
@@ -72,7 +71,6 @@ date: "2020-02-01"
|
||||
}
|
||||
|
||||
func TestPagesSortCollation(t *testing.T) {
|
||||
|
||||
files := `
|
||||
-- config.toml --
|
||||
defaultContentLanguage = 'en'
|
||||
@@ -166,12 +164,7 @@ RelPermalink: {{ .RelPermalink }}
|
||||
|
||||
`
|
||||
|
||||
b := hugolib.NewIntegrationTestBuilder(
|
||||
hugolib.IntegrationTestConfig{
|
||||
T: t,
|
||||
TxtarString: files,
|
||||
}).Build()
|
||||
b := hugolib.Test(t, files)
|
||||
|
||||
b.AssertFileContent("public/a/c/d/index.html", "RelPermalink: /a/c/d/")
|
||||
|
||||
}
|
||||
|
@@ -59,11 +59,7 @@ LangURL: {{ relLangURL "foo" }}
|
||||
|
||||
`
|
||||
|
||||
b := hugolib.NewIntegrationTestBuilder(
|
||||
hugolib.IntegrationTestConfig{
|
||||
T: t,
|
||||
TxtarString: files,
|
||||
}).Build()
|
||||
b := hugolib.Test(t, files)
|
||||
|
||||
b.AssertFileContent("public/en/index.html", `
|
||||
Hello1: Hello
|
||||
|
@@ -156,11 +156,7 @@ resize 2|RelPermalink: {{ $image.RelPermalink }}|MediaType: {{ $image.MediaType
|
||||
|
||||
`
|
||||
|
||||
b := hugolib.NewIntegrationTestBuilder(
|
||||
hugolib.IntegrationTestConfig{
|
||||
T: t,
|
||||
TxtarString: files,
|
||||
}).Build()
|
||||
b := hugolib.Test(t, files)
|
||||
|
||||
b.AssertFileContent("public/index.html",
|
||||
"jpg|RelPermalink: /images/pixel_hu8aa3346827e49d756ff4e630147c42b5_70_filter_17010532266664966692.jpg|MediaType: image/jpeg|Width: 1|Height: 1|",
|
||||
|
Reference in New Issue
Block a user