Sha256: 2c12f49b3ce7795efc7c445aa4de60c063bde56385bee2032655b1bf070d3392
Contents?: true
Size: 800 Bytes
Versions: 17
Compression:
Stored size: 800 Bytes
Contents
require 'spec_helper' describe 'Exhibits index page', type: :feature do context 'with multiple exhibits' do let!(:exhibit) { FactoryGirl.create(:exhibit, title: 'Some Exhibit Title') } let!(:other_exhibit) { FactoryGirl.create(:exhibit, title: 'Some Other Title') } it 'shows some cards for each published exhibit' do visit spotlight.exhibits_path within '.exhibit-card:first-child' do expect(page).to have_selector 'h2', text: 'Some Exhibit Title' end end end context 'with a single exhibit' do let!(:exhibit) { FactoryGirl.create(:exhibit, title: 'Some Exhibit Title') } it 'redirects to the exhibit home page' do visit spotlight.exhibits_path expect(current_url).to eq spotlight.exhibit_root_url(exhibit) end end end
Version data entries
17 entries across 17 versions & 1 rubygems