tests: Address deprecation warnings and errors

This commit is contained in:
Joe Mooring 2024-09-28 13:15:53 -07:00 committed by Bjørn Erik Pedersen
parent d0dca65625
commit d1ba52f3c3
18 changed files with 71 additions and 82 deletions

View file

@ -15,7 +15,6 @@ package hugolib
import (
"fmt"
"html/template"
"strings"
"testing"
@ -45,11 +44,13 @@ func doTestSiteWithPageOutputs(t *testing.T, outputs []string) {
siteConfig := `
baseURL = "http://example.com/blog"
paginate = 1
defaultContentLanguage = "en"
disableKinds = ["section", "term", "taxonomy", "RSS", "sitemap", "robotsTXT", "404"]
[pagination]
pagerSize = 1
[Taxonomies]
tag = "tags"
category = "categories"
@ -221,11 +222,13 @@ func TestRedefineRSSOutputFormat(t *testing.T) {
siteConfig := `
baseURL = "http://example.com/blog"
paginate = 1
defaultContentLanguage = "en"
disableKinds = ["page", "section", "term", "taxonomy", "sitemap", "robotsTXT", "404"]
[pagination]
pagerSize = 1
[outputFormats]
[outputFormats.RSS]
mediatype = "application/rss"
@ -249,7 +252,7 @@ baseName = "feed"
s := h.Sites[0]
// Issue #3450
c.Assert(s.RSSLink(), qt.Equals, template.URL("http://example.com/blog/feed.xml"))
c.Assert(s.Home().OutputFormats().Get("rss").Permalink(), qt.Equals, "http://example.com/blog/feed.xml")
}
// Issue #3614
@ -257,11 +260,13 @@ func TestDotLessOutputFormat(t *testing.T) {
siteConfig := `
baseURL = "http://example.com/blog"
paginate = 1
defaultContentLanguage = "en"
disableKinds = ["page", "section", "term", "taxonomy", "sitemap", "robotsTXT", "404"]
[pagination]
pagerSize = 1
[mediaTypes]
[mediaTypes."text/nodot"]
delimiter = ""