summaryrefslogtreecommitdiffstats
path: root/hugolib/config_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-05-19 09:17:55 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-05-19 09:17:55 +0200
commit03cb38e6c6d60e95df1f40a56fe432e1747ea7ac (patch)
treea155cab6b8f0d7eedd82b777b1aadf9d737a8969 /hugolib/config_test.go
parentad4bc969da46cc624ab17d600a812c966248553d (diff)
Allow legacy taxonomyTerm in disableKinds
Updates #10953
Diffstat (limited to 'hugolib/config_test.go')
-rw-r--r--hugolib/config_test.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/hugolib/config_test.go b/hugolib/config_test.go
index 994734ce6..1d4372e41 100644
--- a/hugolib/config_test.go
+++ b/hugolib/config_test.go
@@ -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)
+}