Sha256: 22c41e2b7362596fc421db7f29dc30f40f8d3d3822e4b225fb435e9700839587

Contents?: true

Size: 677 Bytes

Versions: 12

Compression:

Stored size: 677 Bytes

Contents

# frozen_string_literal: true

describe 'spotlight/browse/index', type: :view do
  let(:search) { FactoryBot.create(:search) }
  let(:another_search) { FactoryBot.create(:search) }

  before { allow(view).to receive(:current_exhibit).and_return(search.exhibit) }

  it 'has a title' do
    assign :groups, []
    render
    expect(response).to have_selector 'h1', text: 'Browse'
  end

  it 'renders the collection of searches' do
    assign :groups, []
    assign :searches, [search, another_search]
    stub_template 'spotlight/browse/_search.html.erb' => '<%= search.id %> <br/>'
    render
    expect(response).to have_content "#{search.id} #{another_search.id}"
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-3.3.0 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-3.2.0 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-3.1.0 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-3.0.3 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-3.0.2 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-3.0.1 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-3.0.0 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc3 spec/views/spotlight/browse/index.html.erb_spec.rb