mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 20:02:09 -05:00
Reset Viper for every duplicate menu test iteration
This commit is contained in:
parent
53c9e890a2
commit
beda46d289
1 changed files with 3 additions and 2 deletions
|
@ -208,8 +208,6 @@ func doTestPageMenuWithIdentifier(t *testing.T, menuPageSources []source.ByteSou
|
||||||
|
|
||||||
// Issue 817 contd - name should be second identifier in
|
// Issue 817 contd - name should be second identifier in
|
||||||
func TestPageMenuWithDuplicateName(t *testing.T) {
|
func TestPageMenuWithDuplicateName(t *testing.T) {
|
||||||
viper.Reset()
|
|
||||||
defer viper.Reset()
|
|
||||||
|
|
||||||
toml := []source.ByteSource{
|
toml := []source.ByteSource{
|
||||||
{"sect/doc1.md", tstCreateMenuPageWithNameTOML("t1", "m1", "n1")},
|
{"sect/doc1.md", tstCreateMenuPageWithNameTOML("t1", "m1", "n1")},
|
||||||
|
@ -229,6 +227,9 @@ func TestPageMenuWithDuplicateName(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func doTestPageMenuWithDuplicateName(t *testing.T, menuPageSources []source.ByteSource) {
|
func doTestPageMenuWithDuplicateName(t *testing.T, menuPageSources []source.ByteSource) {
|
||||||
|
viper.Reset()
|
||||||
|
defer viper.Reset()
|
||||||
|
|
||||||
s := setupMenuTests(t, menuPageSources)
|
s := setupMenuTests(t, menuPageSources)
|
||||||
|
|
||||||
assert.Equal(t, 3, len(s.Pages), "Not enough pages")
|
assert.Equal(t, 3, len(s.Pages), "Not enough pages")
|
||||||
|
|
Loading…
Reference in a new issue