Sha256: 17123587872906e545d6b64dea7494ac11bf5b9772a70b40292dc2e912930c79
Contents?: true
Size: 717 Bytes
Versions: 19
Compression:
Stored size: 717 Bytes
Contents
require 'rails_helper' describe LHS::Data do before 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
19 entries across 19 versions & 1 rubygems