]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
config: Imrove uglyurls section test
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 14 Oct 2024 07:28:18 +0000 (09:28 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 14 Oct 2024 08:03:44 +0000 (10:03 +0200)
Updates #12926

config/allconfig/allconfig_integration_test.go

index 1b677884f59a547e444b3267f7327904dab02269..38e763b70c43f60c694640045a7f29743cd01aba 100644 (file)
@@ -161,7 +161,6 @@ title: "p3"
        b.AssertFileContent("public/page/2/index.html", "pagination-default")
 }
 
-
 func TestMapUglyURLs(t *testing.T) {
        files := `
 -- hugo.toml --
@@ -173,8 +172,6 @@ func TestMapUglyURLs(t *testing.T) {
 
        c := b.H.Configs.Base
 
-       mapUglyURLs, isMap := c.UglyURLs.(map[string]bool)
-
-       b.Assert(isMap, qt.Equals, true)
-       b.Assert(mapUglyURLs["posts"], qt.Equals, true)
+       b.Assert(c.C.IsUglyURLSection("posts"), qt.IsTrue)
+       b.Assert(c.C.IsUglyURLSection("blog"), qt.IsFalse)
 }