Sha256: dcf2e516b4850285bd349fa8b035aeb698e3e84500b285c34413556303b98670
Contents?: true
Size: 632 Bytes
Versions: 21
Compression:
Stored size: 632 Bytes
Contents
require 'rails_helper' describe LHS::Data do before(:each) 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
21 entries across 21 versions & 1 rubygems