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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Kadlecová <jarka@gitlab.com>2018-02-06 19:53:42 +0300
committerJarka Kadlecová <jarka@gitlab.com>2018-02-06 19:58:18 +0300
commit1b2400b529628da08e406e2391ef37c0b05f889e (patch)
treed2c0c3f355d7a60a9de2c7370b3b19a77b8e50a6 /spec/support/matchers
parent7381944565701f2a8db5d58d5bc3c7e52e7f60bf (diff)
Return only limited pagination headers for search API endpoints
Diffstat (limited to 'spec/support/matchers')
-rw-r--r--spec/support/matchers/pagination_matcher.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/matchers/pagination_matcher.rb b/spec/support/matchers/pagination_matcher.rb
index 60f5e8239a7..9a7697e2bfc 100644
--- a/spec/support/matchers/pagination_matcher.rb
+++ b/spec/support/matchers/pagination_matcher.rb
@@ -3,3 +3,9 @@ RSpec::Matchers.define :include_pagination_headers do |expected|
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