Allow legacy taxonomyTerm in disableKinds

Updates #10953
This commit is contained in:
Bjørn Erik Pedersen
2023-05-19 09:17:55 +02:00
parent ad4bc969da
commit 03cb38e6c6
2 changed files with 35 additions and 1 deletions

View File

@@ -897,3 +897,32 @@ mainSections: []
`)
}
func TestConfigLegacyValues(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
# taxonomyTerm was renamed to term in Hugo 0.60.0.
disableKinds = ["taxonomyTerm"]
-- layouts/index.html --
Home
`
b, err := NewIntegrationTestBuilder(
IntegrationTestConfig{
T: t,
TxtarString: files,
},
).BuildE()
b.Assert(err, qt.IsNil)
b.AssertFileContent("public/index.html", `
Home
`)
conf := b.H.Configs.Base
b.Assert(conf.IsKindEnabled("term"), qt.Equals, false)
}