diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-01-24 21:49:10 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-16 15:38:40 +0100 |
commit | c70dfbc68614658c98a0f17a01413844a2a98abf (patch) | |
tree | a12191c56ec8313a033759db2eca31b0fe950e7d /spec/support/matchers | |
parent | 01ea65e0e9ea5e44fa653fb95e7ba8ca1668af98 (diff) | |
download | gitlab-ce-c70dfbc68614658c98a0f17a01413844a2a98abf.tar.gz |
Add a custom pagination matcher
Diffstat (limited to 'spec/support/matchers')
-rw-r--r-- | spec/support/matchers/pagination_matcher.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/matchers/pagination_matcher.rb b/spec/support/matchers/pagination_matcher.rb new file mode 100644 index 00000000000..60f5e8239a7 --- /dev/null +++ b/spec/support/matchers/pagination_matcher.rb @@ -0,0 +1,5 @@ +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 |