From: bep Date: Thu, 11 Jun 2015 19:22:35 +0000 (+0200) Subject: Reset Viper for every duplicate menu test iteration X-Git-Tag: v0.15~351 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=beda46d2;p=brevno-suite%2Fhugo Reset Viper for every duplicate menu test iteration --- diff --git a/hugolib/menu_test.go b/hugolib/menu_test.go index 86839b65..7013822c 100644 --- a/hugolib/menu_test.go +++ b/hugolib/menu_test.go @@ -208,8 +208,6 @@ func doTestPageMenuWithIdentifier(t *testing.T, menuPageSources []source.ByteSou // Issue 817 contd - name should be second identifier in func TestPageMenuWithDuplicateName(t *testing.T) { - viper.Reset() - defer viper.Reset() toml := []source.ByteSource{ {"sect/doc1.md", tstCreateMenuPageWithNameTOML("t1", "m1", "n1")}, @@ -229,6 +227,9 @@ func TestPageMenuWithDuplicateName(t *testing.T) { } func doTestPageMenuWithDuplicateName(t *testing.T, menuPageSources []source.ByteSource) { + viper.Reset() + defer viper.Reset() + s := setupMenuTests(t, menuPageSources) assert.Equal(t, 3, len(s.Pages), "Not enough pages")