diff --git a/hugolib/rss_test.go b/hugolib/rss_test.go index 2bf849f9e..966b00af0 100644 --- a/hugolib/rss_test.go +++ b/hugolib/rss_test.go @@ -20,44 +20,27 @@ import ( "github.com/spf13/viper" ) -const rssTemplate = ` - - {{ .Title }} on {{ .Site.Title }} - {{ .Permalink }} - en-us - Steve Francia - Francia; all rights reserved. - {{ .Date }} - {{ range .Data.Pages }} - - {{ .Title }} - {{ .Permalink }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 MST" }} - Steve Francia - {{ .Permalink }} - {{ .Content | html }} - - {{ end }} - -` - func TestRSSOutput(t *testing.T) { testCommonResetState() - rssURI := "public/customrss.xml" + rssURI := "customrss.xml" viper.Set("baseURL", "http://auth/bub/") viper.Set("rssURI", rssURI) + viper.Set("title", "RSSTest") for _, s := range weightedSources { - writeSource(t, filepath.Join("content", s.Name), string(s.Content)) + writeSource(t, filepath.Join("content", "sect", s.Name), string(s.Content)) } - writeSource(t, filepath.Join("layouts", "rss.xml"), rssTemplate) - if err := buildAndRenderSite(newSiteDefaultLang()); err != nil { t.Fatalf("Failed to build site: %s", err) } - assertFileContent(t, filepath.Join("public", rssURI), true, "