Merge pull request #332 from Skud/rss-links

Added posts and comments RSS links
This commit is contained in:
Skud
2013-10-24 18:06:44 -07:00
4 changed files with 27 additions and 0 deletions

View File

@@ -13,3 +13,8 @@
%div.pagination
= page_entries_info @comments, :model => "comments"
= will_paginate @comments
%p
Subscribe to the #{Growstuff::Application.config.site_name}
= succeed "." do
= link_to "comments RSS feed", comments_path(:format => 'rss')

View File

@@ -25,3 +25,16 @@
%div.pagination
= page_entries_info @posts, :model => "posts"
= will_paginate @posts
%p
- if @author
Subscribe to
= succeed "." do
= link_to "#{@author}'s posts RSS feed", posts_path(:format => 'rss')
- else
Subscribe to the #{Growstuff::Application.config.site_name}
= link_to "posts RSS feed", posts_path(:format => 'rss')
or
= succeed "." do
= link_to "comments RSS feed", comments_path(:format => 'rss')

View File

@@ -21,4 +21,8 @@ describe "comments/index" do
rendered.should contain 'OMG LOL'
rendered.should contain 'ROFL'
end
it "contains an RSS feed link" do
assert_select "a", :href => comments_path(:format => 'rss')
end
end

View File

@@ -27,4 +27,9 @@ describe "posts/index" do
it "contains two gravatar icons" do
assert_select "img", :src => /gravatar\.com\/avatar/, :count => 2
end
it "contains RSS feed links for posts and comments" do
assert_select "a", :href => posts_path(:format => 'rss')
assert_select "a", :href => comments_path(:format => 'rss')
end
end