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