spec/lib/search_results_spec.rb in waistband-0.16.5 vs spec/lib/search_results_spec.rb in waistband-0.16.6

- old
+ new

@@ -28,11 +28,11 @@ }] } } end - let(:results) { ::Waistband::SearchResults.new(search_hash) } + let(:results) { ::Waistband::SearchResults.new(search_hash, page_size: 10) } it "provides a method interface for the results hash array" do expect(results.took).to eql 1 expect(results.timed_out).to be false expect(results._shards).to eql({ @@ -81,10 +81,11 @@ load 'active_support/concern.rb' expect(results.paginated_hits).to be_a ::Waistband::SearchResults::PaginatedArray expect(results.paginated_hits.total_pages).to eql 1 expect(results.paginated_hits.current_page).to eql 1 + expect(results.paginated_hits.instance_variable_get('@per_page')).to eql 10 end end describe '#paginated_results' do @@ -93,9 +94,10 @@ load 'active_support/concern.rb' expect(results.paginated_results).to be_a ::Waistband::SearchResults::PaginatedArray expect(results.paginated_results.total_pages).to eql 1 expect(results.paginated_results.current_page).to eql 1 + expect(results.paginated_hits.instance_variable_get('@per_page')).to eql 10 end end end