Sha256: 8042327863e3c080c7bdab2bc0c8362acc859b7a0d63db09fa9f475194493aa8
Contents?: true
Size: 661 Bytes
Versions: 76
Compression:
Stored size: 661 Bytes
Contents
# frozen_string_literal: true 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
76 entries across 76 versions & 1 rubygems