diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-07-28 12:18:59 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-07-28 15:14:24 +0200 |
commit | bec9b80d95d1be8270bcda080037c588614f3be1 (patch) | |
tree | 80e26516976a1aefc0c91090d05eccadf80badc2 /hugolib/config_test.go | |
parent | 1c97095ac01d7fa9a3e879fa69f7b550c200b567 (diff) |
Deprecate taxonomyTerm
In favour of 'taxonomy'
Closes #11256
Diffstat (limited to 'hugolib/config_test.go')
-rw-r--r-- | hugolib/config_test.go | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/hugolib/config_test.go b/hugolib/config_test.go index 9a1d3bcbf..e912ff721 100644 --- a/hugolib/config_test.go +++ b/hugolib/config_test.go @@ -1612,12 +1612,14 @@ List. } -func TestDisableKindsUnknown(t *testing.T) { +func TestKindsUnknown(t *testing.T) { t.Parallel() files := ` -- hugo.toml -- disableKinds = ['foo', 'home'] +[outputs] +foo = ['HTML', 'AMP', 'RSS'] -- layouts/_default/list.html -- List. @@ -1629,12 +1631,38 @@ List. T: t, TxtarString: files, LogLevel: logg.LevelWarn, - BuildCfg: BuildCfg{SkipRender: true}, }, ).Init() - fmt.Println("LOG:", b.LogString()) + b.AssertLogContains("WARN Unknown kind \"foo\" in disableKinds configuration.\n") + b.AssertLogContains("WARN Unknown kind \"foo\" in outputs configuration.\n") + +} + +func TestDeprecateTaxonomyTerm(t *testing.T) { + t.Parallel() + + files := ` +-- hugo.toml -- +disableKinds = ['taxonomyTerm'] +[outputs] +taxonomyterm = ['HTML', 'AMP', 'RSS'] +-- layouts/_default/list.html -- +List. + + + +` + b := NewIntegrationTestBuilder( + IntegrationTestConfig{ + T: t, + TxtarString: files, + LogLevel: logg.LevelWarn, + BuildCfg: BuildCfg{SkipRender: true}, + }, + ).Init() - b.AssertLogContains("WARN Unknown kind \"foo\" in disableKinds\n") + b.AssertLogContains("WARN DEPRECATED: Kind \"taxonomyterm\" used in disableKinds is deprecated, use \"taxonomy\" instead.\n") + b.AssertLogContains("WARN DEPRECATED: Kind \"taxonomyterm\" used in outputs configuration is deprecated, use \"taxonomy\" instead.\n") } |