Sha256: 92a6fd3763fe73e7b2ab7c291796acf9ed4067c534fca8f9d064260dafb6c828

Contents?: true

Size: 1.18 KB

Versions: 23

Compression:

Stored size: 1.18 KB

Contents

require 'spec_helper'

describe 'spotlight/home_pages/_empty.html.erb', type: :view do
  describe 'resource providers' do
    before do
      allow(view).to receive_messages(current_exhibit: FactoryGirl.create(:exhibit),
                                      can?: true,
                                      edit_exhibit_path: '/',
                                      edit_exhibit_appearance_path: '/',
                                      exhibit_roles_path: '/',
                                      admin_exhibit_catalog_index_path: '/',
                                      edit_exhibit_metadata_configuration_path: '/',
                                      edit_exhibit_search_configuration_path: '/')
    end
    it 'has a list item with a link to add items when there are no resource providers configured' do
      render
      expect(rendered).to have_css('li a', text: 'Curation > Items')
    end
    it 'does not have a list item with a link to add items when there are resource providers configured' do
      allow(Spotlight::Engine.config).to receive_messages(resource_providers: [true])
      render
      expect(rendered).to_not have_css('li a', text: 'Curation > Items')
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
blacklight-spotlight-0.15.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.14.2 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.14.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.14.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.13.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.12.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.12.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.11.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.10.3 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.10.2 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.10.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.10.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.9.2 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.9.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.9.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.8.2 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.8.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.8.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.7.2 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.7.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb