Sha256: 614c29b4971d6079e7ff22a84d588e03b9c6a6107d09a98c87348a886c004951

Contents?: true

Size: 609 Bytes

Versions: 20

Compression:

Stored size: 609 Bytes

Contents

require 'rails_helper'

describe LHS::Data do

  before(:each) do
    class SomeService < LHS::Service
      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, SomeService)
  end

  let(:loaded_data) do
    LHS::Data.new({
      href: 'http://www.local.ch/v2/stuff',
      id: '123123123'
    }, nil, SomeService)
  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

20 entries across 20 versions & 1 rubygems

Version Path
lhs-2.2.2 spec/data/merge_spec.rb
lhs-1.6.1 spec/data/merge_spec.rb
lhs-2.2.1 spec/data/merge_spec.rb
lhs-2.2.0 spec/data/merge_spec.rb
lhs-1.6.0 spec/data/merge_spec.rb
lhs-2.1.1 spec/data/merge_spec.rb
lhs-2.1.0 spec/data/merge_spec.rb
lhs-2.0.5 spec/data/merge_spec.rb
lhs-2.0.4 spec/data/merge_spec.rb
lhs-2.0.3 spec/data/merge_spec.rb
lhs-2.0.2 spec/data/merge_spec.rb
lhs-2.0.1 spec/data/merge_spec.rb
lhs-2.0.0 spec/data/merge_spec.rb
lhs-1.5.0 spec/data/merge_spec.rb
lhs-1.4.0 spec/data/merge_spec.rb
lhs-1.3.1 spec/data/merge_spec.rb
lhs-1.3.0 spec/data/merge_spec.rb
lhs-1.2.3 spec/data/merge_spec.rb
lhs-1.2.2 spec/data/merge_spec.rb
lhs-1.2.1 spec/data/merge_spec.rb