diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-05-19 09:17:55 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-05-19 09:17:55 +0200 |
commit | 03cb38e6c6d60e95df1f40a56fe432e1747ea7ac (patch) | |
tree | a155cab6b8f0d7eedd82b777b1aadf9d737a8969 /hugolib/config_test.go | |
parent | ad4bc969da46cc624ab17d600a812c966248553d (diff) |
Allow legacy taxonomyTerm in disableKinds
Updates #10953
Diffstat (limited to 'hugolib/config_test.go')
-rw-r--r-- | hugolib/config_test.go | 29 |
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) +} |