Sha256: 5621a7da69d22dbe63163c44171d870c71540ccd75d943471474a32d7405e612
Contents?: true
Size: 654 Bytes
Versions: 2
Compression:
Stored size: 654 Bytes
Contents
require 'rspec-api/matchers' module DSL module Request extend ActiveSupport::Concern module ClassMethods def should_match_headers_expectations(status_code) should_have_json_content_type if has_entity_body? status_code should_be_paginated(rspec_api[:page][:name]) if rspec_api[:array] && rspec_api[:page] end private def should_have_json_content_type it { expect(response_headers).to have_json_content_type } end def should_be_paginated(page_parameter) it { expect(response_headers).to have_pagination_links(request_params[page_parameter.to_s]) } end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rspec-api-0.2.0 | lib/rspec-api/dsl/request/headers.rb |
rspec-api-0.1.2 | lib/rspec-api/dsl/request/headers.rb |