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-4.0.0 spec/formats/json_spec.rb
lhc-3.8.1 spec/formats/json_spec.rb
lhc-3.8.0 spec/formats/json_spec.rb
lhc-3.7.3 spec/formats/json_spec.rb
lhc-3.7.2 spec/formats/json_spec.rb
lhc-3.7.2.1 spec/formats/json_spec.rb
lhc-3.7.1 spec/formats/json_spec.rb
lhc-3.7.0 spec/formats/json_spec.rb
lhc-3.7.0.pre1 spec/formats/json_spec.rb
lhc-3.6.1 spec/formats/json_spec.rb
lhc-3.6.0 spec/formats/json_spec.rb
lhc-3.5.5 spec/formats/json_spec.rb
lhc-3.5.4 spec/formats/json_spec.rb
lhc-3.5.3 spec/formats/json_spec.rb