Sha256: ba7b310164a55d7892bebf0fd885cdcfdb2f15f0bc892b0a6c45a746ec67a90b

Contents?: true

Size: 978 Bytes

Versions: 4

Compression:

Stored size: 978 Bytes

Contents

require "spec_helper"
describe "Home page", :type => :feature do
  let(:exhibit_visitor) { FactoryGirl.create(:exhibit_visitor) }
  let!(:default_exhibit) { Spotlight::Exhibit.default }
  let!(:second_exhibit) { FactoryGirl.create(:exhibit, title: "Second exhibit") }

  before {login_as exhibit_visitor}

  it "should exist 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

4 entries across 4 versions & 1 rubygems

Version Path
blacklight-spotlight-0.4.1 spec/features/multiple_exhibits_spec.rb
blacklight-spotlight-0.3.1 spec/features/multiple_exhibits_spec.rb
blacklight-spotlight-0.3.0 spec/features/multiple_exhibits_spec.rb
blacklight-spotlight-0.2.0 spec/features/multiple_exhibits_spec.rb