Sha256: da60e49e17fd6ad39cc7351711ec97d3cb1984819baa38084ae017672e0091d9

Contents?: true

Size: 570 Bytes

Versions: 16

Compression:

Stored size: 570 Bytes

Contents

require 'rails_helper'

describe LHS::Data do
  before(:each) do
    class Record < LHS::Record
      endpoint '{+datastore}/v2/{campaign_id}/feedbacks'
      endpoint '{+datastore}/v2/feedbacks'
    end
  end

  let(:data) do
    LHS::Data.new({ href: 'http://www.local.ch/v2/stuff' }, nil, Record)
  end

  let(:loaded_data) do
    LHS::Data.new({ href: 'http://www.local.ch/v2/stuff', id: '123123123' }, nil, Record)
  end

  context 'merging' do
    it 'merges data' do
      data.merge_raw!(loaded_data)
      expect(data.id).to eq loaded_data.id
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
lhs-15.3.1 spec/data/merge_spec.rb
lhs-15.3.1.pre.fixlhc.1 spec/data/merge_spec.rb
lhs-15.3.0 spec/data/merge_spec.rb
lhs-15.2.5 spec/data/merge_spec.rb
lhs-15.2.4 spec/data/merge_spec.rb
lhs-15.2.3 spec/data/merge_spec.rb
lhs-15.2.3.pre.favorites.1 spec/data/merge_spec.rb
lhs-15.2.2.pre.favorites.1 spec/data/merge_spec.rb
lhs-15.2.2 spec/data/merge_spec.rb
lhs-15.2.1 spec/data/merge_spec.rb
lhs-15.2.0 spec/data/merge_spec.rb
lhs-15.1.1 spec/data/merge_spec.rb
lhs-15.1.0 spec/data/merge_spec.rb
lhs-15.0.2 spec/data/merge_spec.rb
lhs-15.0.1 spec/data/merge_spec.rb
lhs-15.0.0 spec/data/merge_spec.rb