Sha256: bcc748dfa5cc1dce8197b49c6c35f2b2b3d9e5c061a1d340f5471e60776bb5e9

Contents?: true

Size: 362 Bytes

Versions: 54

Compression:

Stored size: 362 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', 'Content-Type' => 'application/json' })
        .to_return(body: {}.to_json)
      LHC.json.get('http://local.ch')
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
lhc-6.6.0 spec/formats/json_spec.rb
lhc-6.5.0 spec/formats/json_spec.rb
lhc-6.4.0 spec/formats/json_spec.rb
lhc-6.3.1 spec/formats/json_spec.rb
lhc-6.3.0 spec/formats/json_spec.rb
lhc-6.2.0 spec/formats/json_spec.rb
lhc-6.1.3 spec/formats/json_spec.rb
lhc-6.1.2 spec/formats/json_spec.rb
lhc-6.1.1 spec/formats/json_spec.rb
lhc-6.1.0 spec/formats/json_spec.rb
lhc-6.0.1 spec/formats/json_spec.rb
lhc-6.0.0 spec/formats/json_spec.rb
lhc-5.1.1 spec/formats/json_spec.rb
lhc-5.1.0 spec/formats/json_spec.rb
lhc-5.0.3 spec/formats/json_spec.rb
lhc-5.0.2 spec/formats/json_spec.rb
lhc-5.0.1 spec/formats/json_spec.rb
lhc-5.0.0 spec/formats/json_spec.rb
lhc-4.0.2 spec/formats/json_spec.rb
lhc-4.0.1 spec/formats/json_spec.rb