Make sure any default mounts show up in "hugo config"

Fixes #11040
This commit is contained in:
Bjørn Erik Pedersen
2023-06-01 09:30:16 +02:00
parent 06faee5beb
commit e3ae8f025d
2 changed files with 41 additions and 0 deletions

View File

@@ -1151,3 +1151,29 @@ weight = 1
})
}
// Issue #11040
func TestConfigModuleDefaultMountsInConfig(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
baseURL = "https://example.org"
contentDir = "mycontent"
-- layouts/index.html --
Home.
`
b := NewIntegrationTestBuilder(
IntegrationTestConfig{
T: t,
TxtarString: files,
},
).Build()
modConf := b.H.Configs.Base.Module
b.Assert(modConf.Mounts, qt.HasLen, 7)
}