Sha256: 8f2fef6203c3a64a0f25fa3b69ad656d0db85d092256747c464d1dfee6bca135

Contents?: true

Size: 1005 Bytes

Versions: 5

Compression:

Stored size: 1005 Bytes

Contents

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

  before { login_as exhibit_visitor }

  it 'exists by default on exhibits' do
    visit '/'

    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

5 entries across 5 versions & 1 rubygems

Version Path
blacklight-spotlight-0.7.2 spec/features/multiple_exhibits_spec.rb
blacklight-spotlight-0.7.1 spec/features/multiple_exhibits_spec.rb
blacklight-spotlight-0.7.0 spec/features/multiple_exhibits_spec.rb
blacklight-spotlight-0.6.0 spec/features/multiple_exhibits_spec.rb
blacklight-spotlight-0.5.0 spec/features/multiple_exhibits_spec.rb