Sha256: 73ae58b61db5fd2685e6d4e85cb8c300f423febf428dbf9c5268208692c25f7c

Contents?: true

Size: 401 Bytes

Versions: 10

Compression:

Stored size: 401 Bytes

Contents

require 'rails_helper'

describe LHC::Response do

  context 'data' do

    let(:value) { 'some_value' }

    let(:body) {{ some_key: {nested: value} }}

    let(:raw_response) { OpenStruct.new({ body: body.to_json }) }

    it 'makes data from response body available' do
      response = LHC::Response.new(raw_response, nil)
      expect(response.data.some_key.nested).to eq value
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
lhc-3.4.0 spec/response/data_spec.rb
lhc-3.3.0 spec/response/data_spec.rb
lhc-3.2.0 spec/response/data_spec.rb
lhc-3.1.1 spec/response/data_spec.rb
lhc-3.1.0 spec/response/data_spec.rb
lhc-3.0.0 spec/response/data_spec.rb
lhc-2.0.0 spec/response/data_spec.rb
lhc-1.2.0 spec/response/data_spec.rb
lhc-1.1.0 spec/response/data_spec.rb
lhc-0.2.1 spec/response/data_spec.rb