Sha256: 01e76540cab1e43cf0440ace9bd9b49086a3c70261cef694344c72cc2f179a31

Contents?: true

Size: 528 Bytes

Versions: 4

Compression:

Stored size: 528 Bytes

Contents

require 'update_helper'
module Alf
  module Update
    describe Inserter, 'defaults' do

      let(:expr)     { extend(suppliers, :foo => lambda{ 12 }) }
      let(:inserted) { [ {:name => "Jones", :foo => 13}, {:name => "Smith"} ] }
      let(:expected) { [ {:name => "Jones"}, {:name => "Smith"} ] }

      subject{ insert(expr, inserted) }

      it 'requests the insertion of the tuples on :suppliers' do
        subject
        db_context.requests.should eq([ [:insert, :suppliers, expected] ])
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-update/inserter/test_extend.rb
alf-core-0.14.0 spec/unit/alf-update/inserter/test_extend.rb
alf-core-0.13.1 spec/unit/alf-update/inserter/test_extend.rb
alf-core-0.13.0 spec/unit/alf-update/inserter/test_extend.rb