File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 20
20
describe 'ActiveRecord Support' do
21
21
let ( :collection ) { Foo . all }
22
22
let ( :per_page ) { 5 }
23
-
24
- if ApiPagination . config . paginator == :kaminari
25
- context 'pagination with kaminari' do
26
- include_examples 'produces_correct_sql'
27
- end
28
- end
29
23
30
24
if ApiPagination . config . paginator == :will_paginate
31
25
require 'will_paginate/active_record'
32
-
33
- context 'pagination with will_paginate' do
34
- include_examples 'produces_correct_sql'
35
- end
26
+ end
27
+
28
+ context "pagination with #{ ApiPagination . config . paginator } " do
29
+ include_examples 'produces_correct_sql'
36
30
end
37
31
38
32
context 'reflections' do
Original file line number Diff line number Diff line change @@ -294,6 +294,7 @@ class Fixnum
294
294
295
295
expect ( response . header [ 'Per-Page' ] ) . to eq (
296
296
case ApiPagination . config . paginator
297
+ when :pagy then Pagy ::VARS [ :items ] . to_s
297
298
when :kaminari then Kaminari . config . default_per_page . to_s
298
299
when :will_paginate then WillPaginate . per_page . to_s
299
300
end
You can’t perform that action at this time.
0 commit comments