Sha256: 245ba543a68d65740c37013cb8f3b47ad9cf46fe7d5be440c2a51c3cf9d3dce4

Contents?: true

Size: 429 Bytes

Versions: 16

Compression:

Stored size: 429 Bytes

Contents

require 'rails_helper'

describe LHS::Item do
  before(:each) do
    class Record < LHS::Record
      endpoint '{+datastore}/records'
    end
  end

  let(:json) do
    {
      local_entry: {
        local_entry_id: 'ABC123'
      }
    }
  end

  let(:item) do
    LHS::Data.new(json, nil, Record)
  end

  it 'is possible to dig data' do
    expect(
      item.dig(:local_entry, :local_entry_id)
    ).to eq 'ABC123'
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
lhs-15.3.1 spec/item/dig_spec.rb
lhs-15.3.1.pre.fixlhc.1 spec/item/dig_spec.rb
lhs-15.3.0 spec/item/dig_spec.rb
lhs-15.2.5 spec/item/dig_spec.rb
lhs-15.2.4 spec/item/dig_spec.rb
lhs-15.2.3 spec/item/dig_spec.rb
lhs-15.2.3.pre.favorites.1 spec/item/dig_spec.rb
lhs-15.2.2.pre.favorites.1 spec/item/dig_spec.rb
lhs-15.2.2 spec/item/dig_spec.rb
lhs-15.2.1 spec/item/dig_spec.rb
lhs-15.2.0 spec/item/dig_spec.rb
lhs-15.1.1 spec/item/dig_spec.rb
lhs-15.1.0 spec/item/dig_spec.rb
lhs-15.0.2 spec/item/dig_spec.rb
lhs-15.0.1 spec/item/dig_spec.rb
lhs-15.0.0 spec/item/dig_spec.rb