creddit/spec/features/subcreddits/list_subcreddits_spec.rb
2015-07-14 13:51:15 -04:00

13 lines
334 B
Ruby

require 'rails_helper'
describe 'New Subcreddit', type: :feature do
let!(:subcreddits) { 5.times.collect { create(:subcreddit) } }
it 'should list all subcreddits' do
visit subcreddits_path
subcreddits.each do |subcreddit|
expect(page).to have_link(subcreddit.name, subcreddit_path(subcreddit))
end
end
end