module RSpecApi::Expectations::Response::Headers::PageLinks
Public Instance Methods
expect_page_links(response, expectations = {})
click to toggle source
# File lib/rspec-api/expectations/headers/page_links.rb, line 8 def expect_page_links(response, expectations = {}) include RSpecApi::Matchers if should_check_page_links(response, expectations) if expectations[:page_links] it { expect(response).to have_page_links } else it { expect(response).not_to have_page_links } end end end
Private Instance Methods
should_check_page_links(response, expectations)
click to toggle source
# File lib/rspec-api/expectations/headers/page_links.rb, line 22 def should_check_page_links(response, expectations) expectations.key?(:page_links) end