Sha256: 8733b7e033e60ac0d0534e08f39d7702c174748969c36a833222857f606b0a29

Contents?: true

Size: 1.26 KB

Versions: 22

Compression:

Stored size: 1.26 KB

Contents

# frozen_string_literal: true

describe 'spotlight/home_pages/_empty.html.erb', type: :view do
  describe 'resource providers' do
    before do
      allow(view).to receive_messages(current_exhibit: FactoryBot.create(:exhibit),
                                      can?: true,
                                      edit_exhibit_path: '/',
                                      edit_exhibit_appearance_path: '/',
                                      exhibit_roles_path: '/',
                                      admin_exhibit_catalog_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 resource partials configured' do
      allow(Spotlight::Engine.config).to receive_messages(resource_partials: [true])
      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 no resource partials configured' do
      allow(Spotlight::Engine.config).to receive_messages(resource_partials: [])
      render
      expect(rendered).not_to have_css('li a', text: 'Curation > Items')
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.3.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.2.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.1.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.3 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.2 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc3 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc2 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.10 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.9 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.8 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.7 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.6 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.5 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb