mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
Stop Viper from leaking across many of the tests (now tests pass regardless of order tested)
This commit is contained in:
@@ -33,10 +33,12 @@ const RSS_TEMPLATE = `<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom
|
||||
</rss>`
|
||||
|
||||
func TestRSSOutput(t *testing.T) {
|
||||
viper.Reset()
|
||||
defer viper.Reset()
|
||||
|
||||
rssUri := "customrss.xml"
|
||||
viper.Set("baseurl", "http://auth/bub/")
|
||||
viper.Set("RSSUri", rssUri)
|
||||
defer viper.Set("RSSUri", "index.xml")
|
||||
|
||||
hugofs.DestinationFS = new(afero.MemMapFs)
|
||||
s := &Site{
|
||||
@@ -44,6 +46,7 @@ func TestRSSOutput(t *testing.T) {
|
||||
}
|
||||
s.initializeSiteInfo()
|
||||
s.prepTemplates()
|
||||
|
||||
// Add an rss.xml template to invoke the rss build.
|
||||
s.addTemplate("rss.xml", RSS_TEMPLATE)
|
||||
|
||||
|
Reference in New Issue
Block a user