Merge remote-tracking branch 'parent/main' into upstream-20240319
This commit is contained in:
commit
76598bd542
496 changed files with 5795 additions and 3709 deletions
13
spec/support/matchers/api_pagination.rb
Normal file
13
spec/support/matchers/api_pagination.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
# 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
|
Loading…
Add table
Add a link
Reference in a new issue