diff options
Diffstat (limited to 'spec/support/matchers/pagination_matcher.rb')
-rw-r--r-- | spec/support/matchers/pagination_matcher.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/matchers/pagination_matcher.rb b/spec/support/matchers/pagination_matcher.rb index a3e9c3b8474..beaba84d78c 100644 --- a/spec/support/matchers/pagination_matcher.rb +++ b/spec/support/matchers/pagination_matcher.rb @@ -11,3 +11,13 @@ RSpec::Matchers.define :include_limited_pagination_headers do |expected| expect(actual.headers).to include('X-Per-Page', 'X-Page', 'X-Next-Page', 'X-Prev-Page', 'Link') end end + +RSpec::Matchers.define :include_keyset_url_params do |expected| + include KeysetPaginationHelpers + + match do |actual| + params_for_next_page = pagination_params_from_next_url(actual) + + expect(params_for_next_page).to include('cursor') + end +end |