hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit beb4ab162da1efa299c814acbd3b26fe6a479349
parent fd08e16ec8abb923a1ffe23a60b2aa8316151559
Author: bep <bjorn.erik.pedersen@gmail.com>
Date:   Fri,  8 May 2015 20:33:40 +0200

Make RSS output test more realistic

By setting a non-default RSS uri config value.

Diffstat:
Mhugolib/rss_test.go | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hugolib/rss_test.go b/hugolib/rss_test.go
@@ -33,8 +33,10 @@ const RSS_TEMPLATE = `<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom
 </rss>`
 
 func TestRSSOutput(t *testing.T) {
+	rssUri := "customrss.xml"
 	viper.Set("baseurl", "http://auth/bub/")
-	viper.Set("RSSUri", "index.xml")
+	viper.Set("RSSUri", rssUri)
+	defer viper.Set("RSSUri", "index.xml")
 
 	hugofs.DestinationFS = new(afero.MemMapFs)
 	s := &Site{
@@ -57,10 +59,10 @@ func TestRSSOutput(t *testing.T) {
 		t.Fatalf("Unable to RenderHomePage: %s", err)
 	}
 
-	file, err := hugofs.DestinationFS.Open("index.xml")
+	file, err := hugofs.DestinationFS.Open(rssUri)
 
 	if err != nil {
-		t.Fatalf("Unable to locate: %s", "index.xml")
+		t.Fatalf("Unable to locate: %s", rssUri)
 	}
 
 	rss := helpers.ReaderToBytes(file)