Sha256: f59bb9db80a89f8b797d6aa9a1b30e483561ce6d1a852160b4b8ccb56febae59

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

require 'spec_helper'
describe 'Home page', type: :feature do
  let(:exhibit_visitor) { FactoryGirl.create(:exhibit_visitor) }
  let!(:default_exhibit) { FactoryGirl.create(:exhibit, title: 'Default exhibit', published: true) }
  let!(:second_exhibit) { FactoryGirl.create(:exhibit, title: 'Second exhibit', published: true) }

  before { login_as exhibit_visitor }

  it 'exists by default on exhibits' do
    visit spotlight.url_for(default_exhibit)

    expect(page).to have_selector '.site-title', text: 'Default exhibit'
    expect(page).to have_link 'More Exhibits'
    within '#exhibit-masthead .dropdown-menu' do
      expect(page).to have_no_link 'Default exhibit'
      click_link 'Second exhibit'
    end

    expect(page).to have_selector '.site-title', text: 'Second exhibit'
    expect(page).to have_link 'More Exhibits'
    within '#exhibit-masthead .dropdown-menu' do
      expect(page).to have_no_link 'Second exhibit'
      click_link 'Default exhibit'
    end
    expect(page).to have_selector '.site-title', text: 'Default exhibit'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacklight-spotlight-0.8.2 spec/features/multiple_exhibits_spec.rb
blacklight-spotlight-0.8.1 spec/features/multiple_exhibits_spec.rb
blacklight-spotlight-0.8.0 spec/features/multiple_exhibits_spec.rb