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.40.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.39.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.38.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.37.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.36.2 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.36.1 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.36.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.35.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.34.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.33.1 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.33.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.32.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.31.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.30.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.29.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.28.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.27.1 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.27.0 spec/views/catalog/_previous_next_doc.html.erb_spec.rb
blacklight-7.26.1 spec/views/catalog/_previous_next_doc.html.erb_spec.rb