Sha256: 69e4a11e1527116b2aefa975776c6101eaec296892b9f94d7237474b3ed8ad48

Contents?: true

Size: 461 Bytes

Versions: 19

Compression:

Stored size: 461 Bytes

Contents

require 'rails_helper'

describe LHS::Item do
  context 'accessors' do
    before do
      class Record < LHS::Record
        endpoint 'http://datastore/records'
      end
    end

    it 'accesses camel case keys using underscore syntax' do
      stub_request(:get, "http://datastore/records?id=1")
        .to_return(body: { 'AttributeValue' => 42 }.to_json)

      record = Record.find(1)
      expect(record.attribute_value).not_to be nil
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
lhs-16.1.5 spec/item/accessors_spec.rb
lhs-16.1.4 spec/item/accessors_spec.rb
lhs-16.1.3 spec/item/accessors_spec.rb
lhs-16.1.2 spec/item/accessors_spec.rb
lhs-16.1.1 spec/item/accessors_spec.rb
lhs-16.1.0 spec/item/accessors_spec.rb
lhs-16.0.1 spec/item/accessors_spec.rb
lhs-16.0.0 spec/item/accessors_spec.rb
lhs-15.7.0 spec/item/accessors_spec.rb
lhs-15.6.1 spec/item/accessors_spec.rb
lhs-15.6.0 spec/item/accessors_spec.rb
lhs-15.5.1 spec/item/accessors_spec.rb
lhs-15.5.0 spec/item/accessors_spec.rb
lhs-15.4.1 spec/item/accessors_spec.rb
lhs-15.4.0 spec/item/accessors_spec.rb
lhs-15.4.0.pre.hasone.1 spec/item/accessors_spec.rb
lhs-15.3.3 spec/item/accessors_spec.rb
lhs-15.3.3.pre.fixoptions.1 spec/item/accessors_spec.rb
lhs-15.3.2 spec/item/accessors_spec.rb