Sha256: 20ed9fb6ea41127ffc94bc7059d2a8a0c9cfdb0120172b0e1d376ea903493a24

Contents?: true

Size: 526 Bytes

Versions: 9

Compression:

Stored size: 526 Bytes

Contents

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

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

  it 'renders the collection of searches' do
    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

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-2.4.0 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-2.3.3 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-2.3.2 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-2.3.1 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-2.3.0 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-2.2.1 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-2.2.0 spec/views/spotlight/browse/index.html.erb_spec.rb
blacklight-spotlight-2.1.0 spec/views/spotlight/browse/index.html.erb_spec.rb