Sha256: 61c5436cfbbf7d4f5bd4732f214df65e14e65848e694462aa4e7f0192384dbe9

Contents?: true

Size: 392 Bytes

Versions: 16

Compression:

Stored size: 392 Bytes

Contents

require 'rails_helper'

describe LHC do
  context 'formats' do
    it 'adds Content-Type and Accept Headers to the request' do
      stub_request(:get, "http://local.ch/")
        .with(headers: { 'Accept' => 'application/json; charset=utf-8', 'Content-Type' => 'application/json; charset=utf-8' })
        .to_return(body: {}.to_json)
      LHC.json.get('http://local.ch')
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
lhc-10.1.0 spec/formats/json_spec.rb
lhc-10.0.2 spec/formats/json_spec.rb
lhc-9.4.4 spec/formats/json_spec.rb
lhc-10.0.1 spec/formats/json_spec.rb
lhc-10.0.0 spec/formats/json_spec.rb
lhc-9.4.3 spec/formats/json_spec.rb
lhc-9.4.2 spec/formats/json_spec.rb
lhc-9.4.1 spec/formats/json_spec.rb
lhc-9.4.0 spec/formats/json_spec.rb
lhc-9.3.1 spec/formats/json_spec.rb
lhc-9.3.0 spec/formats/json_spec.rb
lhc-9.2.0 spec/formats/json_spec.rb
lhc-9.1.2 spec/formats/json_spec.rb
lhc-9.1.2.pre spec/formats/json_spec.rb
lhc-9.1.1 spec/formats/json_spec.rb
lhc-9.1.0 spec/formats/json_spec.rb