Sha256: 28a5b59e97b68d2b490e1abfccedbd5505a879277ad5b0ffddda8dc47626c7f3
Contents?: true
Size: 724 Bytes
Versions: 16
Compression:
Stored size: 724 Bytes
Contents
require 'rails_helper' describe LHS::Data do before(:each) do class Record < LHS::Record endpoint '{+datastore}/v2/entries/{entry_id}/content-ads/{campaign_id}/feedbacks' endpoint '{+datastore}/v2/{campaign_id}/feedbacks' endpoint '{+datastore}/v2/feedbacks' end end context 'root' do it 'is navigateable from nested data' do root = LHS::Data.new({ 'items' => [{ 'campaign' => { 'id' => 123 } }] }, nil, Record) child = root.first leafe = child.campaign expect(leafe._root).to eq root expect(leafe._parent).to be_kind_of LHS::Data expect(leafe._parent._parent).to be_kind_of LHS::Data expect(leafe._parent._parent).to eq root end end end
Version data entries
16 entries across 16 versions & 1 rubygems