diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-05-08 20:33:40 +0200 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-05-08 20:33:37 +0200 |
commit | beb4ab162da1efa299c814acbd3b26fe6a479349 (patch) | |
tree | d6880ae1585b57a158c64f0fe95bceece81714f3 /hugolib/rss_test.go | |
parent | fd08e16ec8abb923a1ffe23a60b2aa8316151559 (diff) |
Make RSS output test more realistic
By setting a non-default RSS uri config value.
Diffstat (limited to 'hugolib/rss_test.go')
-rw-r--r-- | hugolib/rss_test.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hugolib/rss_test.go b/hugolib/rss_test.go index 23b838c40..2b48f10aa 100644 --- 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) |