Sha256: e04dcb73cc38130a822c87f64a6b7d4d3f27af4a021bf3253091407ee532a196
Contents?: true
Size: 1.13 KB
Versions: 1
Compression:
Stored size: 1.13 KB
Contents
require 'rails_helper' describe "manifestations/index" do fixtures :all before(:each) do @manifestations = assign(:manifestations, Kaminari.paginate_array( [ FactoryBot.create(:manifestation), ], total_count: 1).page(1) ) @count = { query_result: 1 } @reservable_facet = @carrier_type_facet = @language_facet = @library_facet = @pub_year_facet = [] @index_agent = {} @seconds = 0 @max_number_of_results = 500 @library_group = LibraryGroup.first view.stub(:params).and_return(ActionController::Parameters.new) view.stub(:filtered_params).and_return(ActionController::Parameters.new(per_page: 50).permit(:per_page)) end it "renders attributes in <p>" do allow(view).to receive(:policy).and_return double(update?: true) render # Run the generator again with the --webrat flag if you want to use webrat matchers rendered.should match(/1/) end it "renders with per_page parameter" do allow(view).to receive(:policy).and_return double(update?: true) params[:per_page] = 3 expect{ render }.not_to raise_error expect( rendered ).to match /31\%/ end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
enju_grid-0.3.0.beta.1 | spec/views/manifestations/index.html.erb_spec.rb |