mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-25 19:27:40 -05:00
RSS feed tests
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature 'Comments RSS feed' do
|
||||
scenario 'This RSS feed exists' do
|
||||
scenario 'The index feed exists' do
|
||||
visit comments_path(:format => 'rss')
|
||||
expect(page.status_code).to equal 200
|
||||
end
|
||||
|
||||
scenario 'The feed title is what we expect' do
|
||||
scenario 'The index title is what we expect' do
|
||||
visit comments_path(:format => 'rss')
|
||||
expect(page).to have_content "#{ENV['GROWSTUFF_SITE_NAME']} - Recent comments on all posts"
|
||||
expect(page).to have_content "Recent comments on all posts (#{ENV['GROWSTUFF_SITE_NAME']})"
|
||||
end
|
||||
end
|
||||
13
spec/features/rss/crops_spec.rb
Normal file
13
spec/features/rss/crops_spec.rb
Normal file
@@ -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
|
||||
15
spec/features/rss/members_spec.rb
Normal file
15
spec/features/rss/members_spec.rb
Normal file
@@ -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
|
||||
13
spec/features/rss/plantings_spec.rb
Normal file
13
spec/features/rss/plantings_spec.rb
Normal file
@@ -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
|
||||
13
spec/features/rss/posts_spec.rb
Normal file
13
spec/features/rss/posts_spec.rb
Normal file
@@ -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
|
||||
13
spec/features/rss/seeds_spec.rb
Normal file
13
spec/features/rss/seeds_spec.rb
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user