line 1;
diff --git a/hugolib/site_test.go b/hugolib/site_test.go
index cf0d4a032..967fb827d 100644
--- a/hugolib/site_test.go
+++ b/hugolib/site_test.go
@@ -436,12 +436,7 @@ MainSections Site method: {{ site.MainSections }}|
`
- b := NewIntegrationTestBuilder(
- IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := Test(t, files)
b.AssertFileContent("public/index.html", `
MainSections Params: [a b]|
@@ -469,12 +464,7 @@ MainSections Site method: {{ site.MainSections }}|
`
- b := NewIntegrationTestBuilder(
- IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := Test(t, files)
b.AssertFileContent("public/index.html", `
MainSections Params: [a b]|
@@ -497,12 +487,7 @@ MainSections Site method: {{ site.MainSections }}|
`
- b := NewIntegrationTestBuilder(
- IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := Test(t, files)
b.AssertFileContent("public/index.html", `
MainSections Params: [mysect]|
diff --git a/hugolib/site_url_test.go b/hugolib/site_url_test.go
index 2cc532854..8efaae3a2 100644
--- a/hugolib/site_url_test.go
+++ b/hugolib/site_url_test.go
@@ -128,12 +128,7 @@ SectionsEntries: {{ .SectionsEntries }}
`
- b := NewIntegrationTestBuilder(
- IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := Test(t, files)
b.AssertFileContent("public/withfile/index.html", "SectionsEntries: [withfile]")
b.AssertFileContent("public/withoutfile/index.html", "SectionsEntries: [withoutfile]")
diff --git a/hugolib/sitemap_test.go b/hugolib/sitemap_test.go
index be13ba1f4..6c2cbc557 100644
--- a/hugolib/sitemap_test.go
+++ b/hugolib/sitemap_test.go
@@ -39,12 +39,7 @@ title: doc2
Doc2
`
- b := NewIntegrationTestBuilder(
- IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := Test(t, files)
b.AssertFileContent("public/sitemap.xml", " https://example.com/sect/doc1/", "doc2")
}
@@ -81,12 +76,7 @@ title: doc2
Doc2
`
- b := NewIntegrationTestBuilder(
- IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := Test(t, files)
b.AssertFileContent("public/sitemap.xml", "https://example.com/en/sitemap.xml", "https://example.com/nn/sitemap.xml")
b.AssertFileContent("public/en/sitemap.xml", " https://example.com/sect/doc1/", "doc2")
@@ -109,12 +99,7 @@ outputs: [ "html", "amp" ]
`
- b := NewIntegrationTestBuilder(
- IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := Test(t, files)
// Should link to the HTML version.
b.AssertFileContent("public/sitemap.xml", " https://example.com/blog/html-amp/")
diff --git a/hugolib/taxonomy_test.go b/hugolib/taxonomy_test.go
index 3132cc485..0db3e9c39 100644
--- a/hugolib/taxonomy_test.go
+++ b/hugolib/taxonomy_test.go
@@ -730,12 +730,7 @@ tags_weight: 40
---
`
- b := NewIntegrationTestBuilder(
- IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := Test(t, files)
b.AssertFileContent("public/index.html", `:/p1/|/p3/|/p2/|:`)
}
diff --git a/langs/i18n/i18n_integration_test.go b/langs/i18n/i18n_integration_test.go
index 7deae6451..b62a2900e 100644
--- a/langs/i18n/i18n_integration_test.go
+++ b/langs/i18n/i18n_integration_test.go
@@ -44,12 +44,7 @@ l1: {{ i18n "l1" }}|l2: {{ i18n "l2" }}|l3: {{ i18n "l3" }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
l1: l1main|l2: l2main|l3: l3theme
@@ -92,12 +87,7 @@ i18n: {{ i18n "a" . }}|
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
i18n: Reading time: 3|
@@ -131,12 +121,7 @@ title: home_es
---
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/es/index.html", `home_es_gato`)
b.AssertFileContent("public/fr/index.html", `home_fr_gato`)
diff --git a/markup/goldmark/codeblocks/codeblocks_integration_test.go b/markup/goldmark/codeblocks/codeblocks_integration_test.go
index 5597fc507..8ed691302 100644
--- a/markup/goldmark/codeblocks/codeblocks_integration_test.go
+++ b/markup/goldmark/codeblocks/codeblocks_integration_test.go
@@ -87,13 +87,7 @@ echo "l8";
§§§
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", `
Goat SVG:|",
@@ -188,13 +176,7 @@ title: "p1"
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", `
# Issue 9627: For the Position in code blocks we try to match the .Inner with the original source. This isn't always possible.
@@ -223,13 +205,7 @@ echo "p1";
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", "|echo \"p1\";|")
}
@@ -257,12 +233,7 @@ Position: {{ .Position | safeHTML }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", filepath.FromSlash("Position: \"/content/p1.md:7:1\""))
}
@@ -290,12 +261,7 @@ Hello, World!
Attributes: {{ .Attributes }}|Type: {{ .Type }}|
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", "Issue 10118
\nAttributes: map[foo:bar]|Type: |")
}
diff --git a/markup/goldmark/goldmark_integration_test.go b/markup/goldmark/goldmark_integration_test.go
index c9c6ef338..ffeb763a7 100644
--- a/markup/goldmark/goldmark_integration_test.go
+++ b/markup/goldmark/goldmark_integration_test.go
@@ -50,13 +50,7 @@ foo
{{ .Content }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", `
@@ -85,13 +79,7 @@ title: "p1"
>{{ .Text | safeHTML }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", `
Heading
@@ -111,13 +99,7 @@ title: "p1"
{{ .Content }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", `
class="a < b"
@@ -141,13 +123,7 @@ safeHTML: |{{- range $k, $v := .Attributes -}}{{ $k }}: {{ $v | safeHTML }}|{{ e
{{ .Content }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", `
plain: |class: Smith & Wesson|id: heading-attribute-which-needs-escaping|
@@ -178,13 +154,7 @@ title: "p1"
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html",
"\n Hello Test\n\n #\n
",
@@ -252,12 +222,7 @@ LINE8
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html",
"",
@@ -397,7 +362,6 @@ FENCE
runBenchmark(files, b)
})
-
}
// Iisse #8959
@@ -406,7 +370,6 @@ func TestHookInfiniteRecursion(t *testing.T) {
for _, renderFunc := range []string{"markdownify", ".Page.RenderString"} {
t.Run(renderFunc, func(t *testing.T) {
-
files := `
-- config.toml --
-- layouts/_default/_markup/render-link.html --
@@ -436,11 +399,8 @@ a@b.com
b.Assert(err, qt.IsNotNil)
b.Assert(err.Error(), qt.Contains, "text is already rendered, repeating it may cause infinite recursion")
-
})
-
}
-
}
// Issue 9594
@@ -460,12 +420,7 @@ title: "p1"
{{ .Content }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", `
@@ -476,7 +431,6 @@ func TestLinkifyProtocol(t *testing.T) {
t.Parallel()
runTest := func(protocol string, withHook bool) *hugolib.IntegrationTestBuilder {
-
files := `
-- config.toml --
[markup.goldmark]
@@ -507,7 +461,6 @@ Link https procol: https://www.example.org
TxtarString: files,
},
).Build()
-
}
for _, withHook := range []bool{false, true} {
@@ -564,12 +517,7 @@ a c
{{ .Content }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContentExact("public/p1/index.html",
// Issue 9650
@@ -621,12 +569,7 @@ sc3_begin|{{ .Inner }}|sc3_end
{{ .Content }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContentExact("public/p1/index.html",
// Issue #7332
@@ -657,12 +600,7 @@ title: "p1"
{{ .Content }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContentExact("public/p1/index.html", "
:x:
")
}
@@ -680,12 +618,7 @@ title: "p1"
{{ .Content }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContentExact("public/p1/index.html", ":x:
")
}
diff --git a/markup/goldmark/images/images_integration_test.go b/markup/goldmark/images/images_integration_test.go
index 8b0ba99c1..387287e7a 100644
--- a/markup/goldmark/images/images_integration_test.go
+++ b/markup/goldmark/images/images_integration_test.go
@@ -45,13 +45,7 @@ This is an inline image: ![Inline Image](/inline.jpg). Some more text.
{{ end }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html",
"This is an inline image: \n\t\n. Some more text.",
@@ -70,13 +64,7 @@ This is an inline image: ![Inline Image](/inline.jpg). Some more text.
{{ end }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html",
"This is an inline image: \n\t\n. Some more text.",
@@ -86,26 +74,14 @@ This is an inline image: ![Inline Image](/inline.jpg). Some more text.
t.Run("No Hook, no wrap", func(t *testing.T) {
files := strings.ReplaceAll(filesTemplate, "CONFIG_VALUE", "false")
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", "This is an inline image: . Some more text.
\n")
})
t.Run("No Hook, wrap", func(t *testing.T) {
files := strings.ReplaceAll(filesTemplate, "CONFIG_VALUE", "true")
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", "")
})
diff --git a/markup/highlight/highlight_integration_test.go b/markup/highlight/highlight_integration_test.go
index b53b585c0..d36bc820a 100644
--- a/markup/highlight/highlight_integration_test.go
+++ b/markup/highlight/highlight_integration_test.go
@@ -67,13 +67,7 @@ HighlightCodeBlock: Wrapped:{{ $result.Wrapped }}|Inner:{{ $result.Inner }}
{{ .Content }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html",
"Inline:(message "this highlight shortcode")
:End.",
@@ -103,13 +97,7 @@ xəx := 0
{{ .Content }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- NeedsOsFS: false,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
xəx
diff --git a/related/related_integration_test.go b/related/related_integration_test.go
index 2c71c1d1a..291bfdbf7 100644
--- a/related/related_integration_test.go
+++ b/related/related_integration_test.go
@@ -114,11 +114,7 @@ Content: {{ .Content }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- }).Build()
+ b := hugolib.Test(t, files)
expect := `
P1 Fragments: [p1-title]
diff --git a/resources/page/page_integration_test.go b/resources/page/page_integration_test.go
index 0761de249..763499113 100644
--- a/resources/page/page_integration_test.go
+++ b/resources/page/page_integration_test.go
@@ -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/")
-
}
diff --git a/resources/resource_transformers/templates/templates_integration_test.go b/resources/resource_transformers/templates/templates_integration_test.go
index 4eaac8e27..969e09c36 100644
--- a/resources/resource_transformers/templates/templates_integration_test.go
+++ b/resources/resource_transformers/templates/templates_integration_test.go
@@ -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
diff --git a/resources/resources_integration_test.go b/resources/resources_integration_test.go
index 9540b0976..a0b35196a 100644
--- a/resources/resources_integration_test.go
+++ b/resources/resources_integration_test.go
@@ -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|",
diff --git a/tpl/collections/collections_integration_test.go b/tpl/collections/collections_integration_test.go
index 24727a12c..1bcabb447 100644
--- a/tpl/collections/collections_integration_test.go
+++ b/tpl/collections/collections_integration_test.go
@@ -32,12 +32,7 @@ baseURL = 'http://example.com/'
{{ return "foo"}}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
[foo foo foo]
@@ -89,12 +84,7 @@ func TestAppendSliceToASliceOfSlices(t *testing.T) {
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", "[[a] [b] [c]]")
}
@@ -113,12 +103,7 @@ func TestAppendNilToSlice(t *testing.T) {
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", "[a <nil>]")
}
@@ -180,12 +165,7 @@ title: "p3"
{{< lorem 60 >}}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
Home: p1|p3|
@@ -218,12 +198,7 @@ foo: bc
{{- end -}}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", "")
}
@@ -246,12 +221,7 @@ boolf = false
{{ echoParam .Site.Params.footer "boolf" }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html",
"foo",
"42",
diff --git a/tpl/images/images_integration_test.go b/tpl/images/images_integration_test.go
index 81f35e39c..003422aed 100644
--- a/tpl/images/images_integration_test.go
+++ b/tpl/images/images_integration_test.go
@@ -40,12 +40,7 @@ imageConfig2 OK: {{ (imageConfig $path2).Width }}|
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
fileExists OK: true|
diff --git a/tpl/page/page_integration_test.go b/tpl/page/page_integration_test.go
index 632c3b64e..22f6323dd 100644
--- a/tpl/page/page_integration_test.go
+++ b/tpl/page/page_integration_test.go
@@ -196,12 +196,7 @@ title: "P1"
{{ .Content }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", " \nHeading 1
")
}
diff --git a/tpl/partials/partials_integration_test.go b/tpl/partials/partials_integration_test.go
index e48f3bb20..f2bde29c3 100644
--- a/tpl/partials/partials_integration_test.go
+++ b/tpl/partials/partials_integration_test.go
@@ -39,12 +39,7 @@ partial: {{ partials.Include "foo.html" . }}
foo
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
partial: foo
@@ -64,12 +59,7 @@ partialCached: {{ partials.IncludeCached "foo.html" . }}
foo
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
partialCached: foo
@@ -93,12 +83,7 @@ P2
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
P2
@@ -130,12 +115,7 @@ P2
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
SHORT
@@ -180,12 +160,7 @@ D1
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
// fmt.Println(b.FileContent("public/index.html"))
@@ -340,12 +315,7 @@ FOO:{{ $r.Content }}
BAR
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", "OO:BAR")
}
diff --git a/tpl/resources/resources_integration_test.go b/tpl/resources/resources_integration_test.go
index 02aa5d29d..5a3c29666 100644
--- a/tpl/resources/resources_integration_test.go
+++ b/tpl/resources/resources_integration_test.go
@@ -54,11 +54,7 @@ Copy3: {{ $copy3.RelPermalink}}|{{ $copy3.MediaType }}|{{ $copy3.Content | safeJ
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- }).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
Image Orig: /blog/images/pixel.png|image/png|1|1|
@@ -112,11 +108,7 @@ iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAA
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- }).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
Image OK
diff --git a/tpl/templates/templates_integration_test.go b/tpl/templates/templates_integration_test.go
index 7e0bcc824..301f783a5 100644
--- a/tpl/templates/templates_integration_test.go
+++ b/tpl/templates/templates_integration_test.go
@@ -34,12 +34,7 @@ partials/doesnotexist.html: {{ templates.Exists "partials/doesnotexist.html" }}
-- layouts/partials/foo.html --
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
index.html: true
@@ -69,12 +64,7 @@ post/doesnotexist.html: {{ templates.Exists "post/doesnotexist.html" }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
index.html: true
@@ -96,12 +86,7 @@ Home: {{ page.IsHome }}
`
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- TxtarString: files,
- },
- ).Build()
+ b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", `
Home: true