Sha256: e3f6ff4c7fb2a9c4668105d925267f8fa49f8dbad2eae523ae2b0349b68b586e

Contents?: true

Size: 790 Bytes

Versions: 82

Compression:

Stored size: 790 Bytes

Contents

# frozen_string_literal: true

RSpec.describe "catalog/_paginate_compact.html.erb" do
  let(:user) { User.new { |u| u.save(validate: false) } }

  before do
    controller.request.path_parameters[:action] = 'index'
  end

  it "renders paginatable arrays" do
    render partial: 'catalog/paginate_compact', object: Kaminari.paginate_array([], total_count: 145).page(1).per(10)
    expect(rendered).to have_selector ".page-entries"
    expect(rendered).to have_selector "a[@rel=next]"
  end

  it "renders ActiveRecord collections" do
    50.times { b = Bookmark.new; b.user = user; b.save! }
    render partial: 'catalog/paginate_compact', object: Bookmark.page(1).per(25)
    expect(rendered).to have_selector ".page-entries"
    expect(rendered).to have_selector "a[@rel=next]"
  end
end

Version data entries

82 entries across 82 versions & 2 rubygems

Version Path
blacklight-7.38.0 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-7.37.0 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-7.36.2 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-7.36.1 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-7.36.0 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-7.35.0 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-7.34.0 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-8.0.1 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-8.0.0 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-8.0.0.beta8 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-8.0.0.beta7 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-8.0.0.beta6 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-8.0.0.beta5 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-7.33.1 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-8.0.0.beta4 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-8.0.0.beta3 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-8.0.0.beta2 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-8.0.0.beta1 spec/views/catalog/_paginate_compact.html.erb_spec.rb
blacklight-7.33.0 spec/views/catalog/_paginate_compact.html.erb_spec.rb