Sha256: 48e7aa7a8fd42a0a83ef4c47d920820baaaa92811b81da540dcb8f50967df546
Contents?: true
Size: 802 Bytes
Versions: 12
Compression:
Stored size: 802 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe DHS::Data do before do class Record < DHS::Record endpoint 'http://depay.fi/records' end end let(:item) do { customer: { addresses: [ { first_line: 'Bachstr. 6' } ] } } end let(:data) do DHS::Data.new( { href: 'http://depay.fi/records', items: [item] }, nil, Record ) end it 'provides the information which type of proxy data ist' do expect(data.collection?).to eq true expect(data.first.item?).to eq true expect(data.first.customer.item?).to eq true expect(data.first.customer.addresses.collection?).to eq true expect(data.first.customer.addresses.first.item?).to eq true end end
Version data entries
12 entries across 12 versions & 1 rubygems