File tree 2 files changed +3
-3
lines changed
lib/elasticsearch/model/response
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def limit_value
50
50
when search . definition [ :size ]
51
51
search . definition [ :size ]
52
52
else
53
- 0
53
+ search . klass . default_per_page
54
54
end
55
55
end
56
56
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def self.document_type; 'bar'; end
13
13
'hits' => { 'total' => 100 , 'hits' => ( 1 ..100 ) . to_a . map { |i | { _id : i } } } }
14
14
15
15
setup do
16
- @search = Elasticsearch ::Model ::Searching ::SearchRequest . new ModelClass , '*'
16
+ @search = Elasticsearch ::Model ::Searching ::SearchRequest . new ModelClass , '*'
17
17
@response = Elasticsearch ::Model ::Response ::Response . new ModelClass , @search , RESPONSE
18
18
@response . klass . stubs ( :client ) . returns mock ( 'client' )
19
19
end
@@ -62,7 +62,7 @@ def self.document_type; 'bar'; end
62
62
63
63
context "limit/offset readers" do
64
64
should "return the default" do
65
- assert_equal 0 , @response . limit_value
65
+ assert_equal Kaminari . config . default_per_page , @response . limit_value
66
66
assert_equal 0 , @response . offset_value
67
67
end
68
68
You can’t perform that action at this time.
0 commit comments