diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-09-05 10:46:47 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-09-05 12:12:24 +0200 |
commit | 66a3a1100167e26a13078c311318cd0576dd14ee (patch) | |
tree | 9fa85b2d0170399fca960097e7af050151c68f09 /hugolib | |
parent | 8f2eac0195cf02f7edbcbce4b7e02768b12762fe (diff) | |
download | hugo-66a3a1100167e26a13078c311318cd0576dd14ee.tar.gz hugo-66a3a1100167e26a13078c311318cd0576dd14ee.zip |
Fix stray end p tag in Obsidian callout titles
Also remove test references to deprecated funcs now in ERROR.
Closes #12828
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/page_test.go | 2 | ||||
-rw-r--r-- | hugolib/securitypolicies_test.go | 29 | ||||
-rw-r--r-- | hugolib/site_stats_test.go | 3 | ||||
-rw-r--r-- | hugolib/site_test.go | 4 |
4 files changed, 4 insertions, 34 deletions
diff --git a/hugolib/page_test.go b/hugolib/page_test.go index 47f7c59c9..66afd7d96 100644 --- a/hugolib/page_test.go +++ b/hugolib/page_test.go @@ -523,7 +523,7 @@ categories: ["cool stuff"] for _, p := range s.Pages() { checkDated(p, p.Kind()) } - checkDate(s.LastChange(), "site") + checkDate(s.Lastmod(), "site") } func TestPageDatesSections(t *testing.T) { diff --git a/hugolib/securitypolicies_test.go b/hugolib/securitypolicies_test.go index b0d39c697..3ddda7d6a 100644 --- a/hugolib/securitypolicies_test.go +++ b/hugolib/securitypolicies_test.go @@ -188,33 +188,4 @@ mediaTypes=["application/json"] `) }) }) - - c.Run("getJSON, OK", func(c *qt.C) { - c.Parallel() - httpTestVariant(c, `{{ $json := getJSON "%[1]s/fruits.json" }}{{ $json.Content }}`, "", nil) - }) - - c.Run("getJSON, denied URL", func(c *qt.C) { - c.Parallel() - httpTestVariant(c, `{{ $json := getJSON "%[1]s/fruits.json" }}{{ $json.Content }}`, `(?s).*is not whitelisted in policy "security\.http\.urls".*`, - func(b *sitesBuilder) { - b.WithConfigFile("toml", ` -[security] -[security.http] -urls="none" -`) - }) - }) - - c.Run("getCSV, denied URL", func(c *qt.C) { - c.Parallel() - httpTestVariant(c, `{{ $d := getCSV ";" "%[1]s/cities.csv" }}{{ $d.Content }}`, `(?s).*is not whitelisted in policy "security\.http\.urls".*`, - func(b *sitesBuilder) { - b.WithConfigFile("toml", ` -[security] -[security.http] -urls="none" -`) - }) - }) } diff --git a/hugolib/site_stats_test.go b/hugolib/site_stats_test.go index 167194ef5..7fd68ff44 100644 --- a/hugolib/site_stats_test.go +++ b/hugolib/site_stats_test.go @@ -121,11 +121,10 @@ date: 2023-04-01 --- -- layouts/index.html -- site.Lastmod: {{ .Site.Lastmod.Format "2006-01-02" }} -site.LastChange: {{ .Site.LastChange.Format "2006-01-02" }} home.Lastmod: {{ site.Home.Lastmod.Format "2006-01-02" }} ` b := Test(t, files) - b.AssertFileContent("public/index.html", "site.Lastmod: 2023-04-01\nsite.LastChange: 2023-04-01\nhome.Lastmod: 2023-01-01") + b.AssertFileContent("public/index.html", "site.Lastmod: 2023-04-01\nhome.Lastmod: 2023-01-01") } diff --git a/hugolib/site_test.go b/hugolib/site_test.go index 37546824a..2ee33da24 100644 --- a/hugolib/site_test.go +++ b/hugolib/site_test.go @@ -147,8 +147,8 @@ func TestLastChange(t *testing.T) { s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Configs: configs}, BuildCfg{SkipRender: true}) - c.Assert(s.LastChange().IsZero(), qt.Equals, false) - c.Assert(s.LastChange().Year(), qt.Equals, 2017) + c.Assert(s.Lastmod().IsZero(), qt.Equals, false) + c.Assert(s.Lastmod().Year(), qt.Equals, 2017) } // Issue #_index |