Sha256: 0b4872ee677ba3fb9cea4c81f31d952376b3efbf548a664089fe436fe6ffaad0

Contents?: true

Size: 740 Bytes

Versions: 56

Compression:

Stored size: 740 Bytes

Contents

# frozen_string_literal: true

RSpec.describe "catalog/_previous_next_doc.html.erb" do
  before do
    allow(view).to receive(:search_session).and_return({})
  end

  it "without next or previous does not render content" do
    assign(:search_context, {})
    render
    expect(rendered).not_to have_selector ".pagination-search-widgets"
  end

  it "with next or previous does render content" do
    assign(:search_context, next: 'foo', prev: 'bar')
    allow(view).to receive(:link_to_previous_document).and_return('')
    allow(view).to receive(:item_page_entry_info).and_return('')
    allow(view).to receive(:link_to_next_document).and_return('')
    render
    expect(rendered).to have_selector ".pagination-search-widgets"
  end
end

Version data entries

56 entries across 56 versions & 2 rubygems

Version Path
blacklight-7.26.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.25.3 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.25.2 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.25.1 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.25.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.24.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.23.0.1 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.23.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.22.2 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.22.1 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.22.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.21.2 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.21.1 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.21.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.20.1 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.20.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.19.2 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.19.1 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.19.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.18.1 spec/views/catalog/_previous_next_doc.html.erb_spec.rb