mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 22:18:06 +01:00
13 lines
369 B
Ruby
13 lines
369 B
Ruby
# 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 |response|
|
|
"expected that #{response.headers['Link']} would have the same values as #{links}."
|
|
end
|
|
end
|