diff --git a/app/views/comments/index.rss.haml b/app/views/comments/index.rss.haml index d04f5be76..5df3b3403 100644 --- a/app/views/comments/index.rss.haml +++ b/app/views/comments/index.rss.haml @@ -1,7 +1,7 @@ %rss{:version => 2.0} %channel - %title #{ENV['GROWSTUFF_SITE_NAME']} - Recent comments on all posts + %title Recent comments on all posts (#{ENV['GROWSTUFF_SITE_NAME']}) %link= comments_url - @comments.each do |comment| %item diff --git a/app/views/crops/index.rss.haml b/app/views/crops/index.rss.haml index 0766a5348..5714a594c 100644 --- a/app/views/crops/index.rss.haml +++ b/app/views/crops/index.rss.haml @@ -1,7 +1,7 @@ %rss{:version => 2.0} %channel - %title #{ENV['GROWSTUFF_SITE_NAME']} - Recently added crops + %title Recently added crops (#{ENV['GROWSTUFF_SITE_NAME']}) %link= crops_url - @crops.each do |crop| %item diff --git a/app/views/members/show.rss.haml b/app/views/members/show.rss.haml index 96c17f984..6d727fbbe 100644 --- a/app/views/members/show.rss.haml +++ b/app/views/members/show.rss.haml @@ -1,7 +1,7 @@ %rss{:version => 2.0} %channel - %title #{ENV['GROWSTUFF_SITE_NAME']} - #{@member.login_name}'s recent posts + %title #{@member.login_name}'s recent posts (#{ENV['GROWSTUFF_SITE_NAME']}) %link= member_url(@member) - @posts.each do |post| %item diff --git a/app/views/plantings/index.rss.haml b/app/views/plantings/index.rss.haml index 04304c635..623b3a93e 100644 --- a/app/views/plantings/index.rss.haml +++ b/app/views/plantings/index.rss.haml @@ -2,7 +2,7 @@ %rss{:version => 2.0} %channel %title - #{ENV['GROWSTUFF_SITE_NAME']} - Recent plantings from #{ @owner ? @owner : 'all members' } + Recent plantings from #{ @owner ? @owner : 'all members' } (#{ENV['GROWSTUFF_SITE_NAME']}) %link= plantings_url - @plantings.each do |planting| %item diff --git a/app/views/posts/index.rss.haml b/app/views/posts/index.rss.haml index 34c0d1153..19832b013 100644 --- a/app/views/posts/index.rss.haml +++ b/app/views/posts/index.rss.haml @@ -2,7 +2,7 @@ %rss{:version => 2.0} %channel %title - #{ENV['GROWSTUFF_SITE_NAME']} - Recent posts from #{ @author ? @author : 'all members' } + Recent posts from #{ @author ? @author : 'all members' } (#{ENV['GROWSTUFF_SITE_NAME']}) %link= posts_url - @posts.each do |post| %item diff --git a/app/views/posts/show.rss.haml b/app/views/posts/show.rss.haml index 0bc4e2348..ccec88cca 100644 --- a/app/views/posts/show.rss.haml +++ b/app/views/posts/show.rss.haml @@ -1,7 +1,7 @@ %rss{:version => 2.0} %channel - %title #{ENV['GROWSTUFF_SITE_NAME']} - Recent comments on #{@post.subject} + %title Recent comments on #{@post.subject} (#{ENV['GROWSTUFF_SITE_NAME']}) %link= post_url(@post) - @post.comments.each do |comment| %item diff --git a/app/views/seeds/index.rss.haml b/app/views/seeds/index.rss.haml index 570f35f2f..30cec02af 100644 --- a/app/views/seeds/index.rss.haml +++ b/app/views/seeds/index.rss.haml @@ -2,7 +2,7 @@ %rss{:version => 2.0} %channel %title - #{ENV['GROWSTUFF_SITE_NAME']} - Recent seeds from #{ @owner ? @owner : 'all members' } + Recent seeds from #{ @owner ? @owner : 'all members' } (#{ENV['GROWSTUFF_SITE_NAME']}) %link= seeds_url - @seeds.each do |seed| %item diff --git a/spec/features/rss/comments_spec.rb b/spec/features/rss/comments_spec.rb new file mode 100644 index 000000000..3f7ce9dc8 --- /dev/null +++ b/spec/features/rss/comments_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper' + +feature 'Comments RSS feed' do + scenario 'The index feed exists' do + visit comments_path(:format => 'rss') + expect(page.status_code).to equal 200 + end + + scenario 'The index title is what we expect' do + visit comments_path(:format => 'rss') + expect(page).to have_content "Recent comments on all posts (#{ENV['GROWSTUFF_SITE_NAME']})" + end +end \ No newline at end of file diff --git a/spec/features/rss/crops_spec.rb b/spec/features/rss/crops_spec.rb new file mode 100644 index 000000000..971ec1b80 --- /dev/null +++ b/spec/features/rss/crops_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper' + +feature 'Crops RSS feed' do + scenario 'The index feed exists' do + visit crops_path(:format => 'rss') + expect(page.status_code).to equal 200 + end + + scenario 'The index title is what we expect' do + visit crops_path(:format => 'rss') + expect(page).to have_content "Recently added crops (#{ENV['GROWSTUFF_SITE_NAME']})" + end +end \ No newline at end of file diff --git a/spec/features/rss/members_spec.rb b/spec/features/rss/members_spec.rb new file mode 100644 index 000000000..69abb5a25 --- /dev/null +++ b/spec/features/rss/members_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +feature 'Members RSS feed' do + let(:member) { FactoryGirl.create(:member) } + + scenario 'The show action exists' do + visit member_path(member, :format => 'rss') + expect(page.status_code).to equal 200 + end + + scenario 'The show action title is what we expect' do + visit member_path(member, :format => 'rss') + expect(page).to have_content "#{member.login_name}'s recent posts (#{ENV['GROWSTUFF_SITE_NAME']})" + end +end \ No newline at end of file diff --git a/spec/features/rss/plantings_spec.rb b/spec/features/rss/plantings_spec.rb new file mode 100644 index 000000000..5a0e98371 --- /dev/null +++ b/spec/features/rss/plantings_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper' + +feature 'Plantings RSS feed' do + scenario 'The index feed exists' do + visit plantings_path(:format => 'rss') + expect(page.status_code).to equal 200 + end + + scenario 'The index title is what we expect' do + visit plantings_path(:format => 'rss') + expect(page).to have_content "Recent plantings from #{ @owner ? @owner : 'all members' } (#{ENV['GROWSTUFF_SITE_NAME']})" + end +end \ No newline at end of file diff --git a/spec/features/rss/posts_spec.rb b/spec/features/rss/posts_spec.rb new file mode 100644 index 000000000..899c1427b --- /dev/null +++ b/spec/features/rss/posts_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper' + +feature 'Posts RSS feed' do + scenario 'The index feed exists' do + visit posts_path(:format => 'rss') + expect(page.status_code).to equal 200 + end + + scenario 'The index title is what we expect' do + visit posts_path(:format => 'rss') + expect(page).to have_content "Recent posts from #{ @author ? @author : 'all members' } (#{ENV['GROWSTUFF_SITE_NAME']})" + end +end \ No newline at end of file diff --git a/spec/features/rss/seeds_spec.rb b/spec/features/rss/seeds_spec.rb new file mode 100644 index 000000000..e0d016939 --- /dev/null +++ b/spec/features/rss/seeds_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper' + +feature 'Seeds RSS feed' do + scenario 'The index feed exists' do + visit seeds_path(:format => 'rss') + expect(page.status_code).to equal 200 + end + + scenario 'The index title is what we expect' do + visit seeds_path(:format => 'rss') + expect(page).to have_content "Recent seeds from #{ @owner ? @owner : 'all members' } (#{ENV['GROWSTUFF_SITE_NAME']})" + end +end \ No newline at end of file