Add have_http_link_header
matcher and set header values as strings (#31010)
This commit is contained in:
parent
09017dd8f0
commit
7efe0bde9d
10 changed files with 54 additions and 39 deletions
|
@ -3,7 +3,7 @@
|
|||
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
|
||||
expect(response).to have_http_link_header(value).for(rel: key.to_s)
|
||||
end.all?
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue