Sha256: 7c61e556e796a1a36991ca408c2d54efa6f8d472764042ba111f81f252cbc505

Contents?: true

Size: 1.26 KB

Versions: 18

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).to_not have_css('li a', text: 'Curation > Items')
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.alpha.2 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.13.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.12.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.12.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.11.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.10.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.9.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.8.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.7.2 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.7.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.7.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.6.1.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.6.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.6.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.5.2 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.5.1 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.5.0 spec/views/spotlight/home_pages/_empty.html.erb_spec.rb