Sha256: 8a73781c2e9b3a0c191e2fe43c5ab03d443556b9e539faff2b72db77b62ae7a8
Contents?: true
Size: 1013 Bytes
Versions: 10
Compression:
Stored size: 1013 Bytes
Contents
require 'spec_helper' describe 'catalog/_sort_and_per_page.html.erb', :type => :view do before do allow(controller).to receive(:current_user).and_return(stub_model(User)) allow_any_instance_of(Ability).to receive(:can?).and_return(true) @resp = ["a","b","c"] assign(:response, @resp ) allow(@resp).to receive(:total_count).and_return(20) allow(@resp).to receive(:limit_value).and_return(3) allow(@resp).to receive(:rows).and_return(3) allow(@resp).to receive(:offset_value).and_return(3) allow(@resp).to receive(:current_page).and_return(2) allow(@resp).to receive(:total_pages).and_return(7) allow(view).to receive(:blacklight_config).and_return(CatalogController.blacklight_config) end it 'appears on page without error' do render page = Capybara::Node::Simple.new(rendered) expect(page).to have_selector('span.page_entries', count: 1) expect(rendered).to include("<strong>4</strong> - <strong>6</strong> of <strong>20</strong>") end end
Version data entries
10 entries across 10 versions & 1 rubygems