Sha256: 3ffc7440dfedcaa6b39ab382c39c8d5219547ec253e5133932e4163099b2cad8
Contents?: true
Size: 630 Bytes
Versions: 19
Compression:
Stored size: 630 Bytes
Contents
require 'rails_helper' describe LHS::Data do before do class Record < LHS::Record endpoint 'http://local.ch/records' end end let(:item) do { customer: { address: { first_line: 'Bachstr. 6' } } } end let(:data) do LHS::Data.new( { href: 'http://local.ch/records', items: [item] }, nil, Record ) end it 'possible to navigate the parent' do expect( data.first.customer.address.parent ).to eq data.first.customer expect( data.first.customer.address.parent.parent ).to eq data.first end end
Version data entries
19 entries across 19 versions & 1 rubygems