Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pagination_matcher.rb « matchers « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a3e9c3b8474e0c06dfdc6aada0fc0a70b202ee57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

RSpec::Matchers.define :include_pagination_headers do |expected|
  match do |actual|
    expect(actual.headers).to include('X-Total', 'X-Total-Pages', 'X-Per-Page', 'X-Page', 'X-Next-Page', 'X-Prev-Page', 'Link')
  end
end

RSpec::Matchers.define :include_limited_pagination_headers do |expected|
  match do |actual|
    expect(actual.headers).to include('X-Per-Page', 'X-Page', 'X-Next-Page', 'X-Prev-Page', 'Link')
  end
end