You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
349 B
13 lines
349 B
# frozen_string_literal: true |
|
|
|
RSpec::Matchers.define :include_pagination_headers do |links| |
|
match do |response| |
|
links.map do |key, value| |
|
response.headers['Link'].find_link(['rel', key.to_s]).href == value |
|
end.all? |
|
end |
|
|
|
failure_message do |header| |
|
"expected that #{header} would have the same values as #{links}." |
|
end |
|
end
|
|
|