Sha256: 8c65d43042054a95f422540581f512a6a94842d9da39b5ef3f77c8acd5a35af8

Contents?: true

Size: 494 Bytes

Versions: 4

Compression:

Stored size: 494 Bytes

Contents

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

      let(:expr)     { autonum(suppliers, :auto)          }
      let(:inserted) { [ {:auto => 1, :name => "Jones"} ] }
      let(:expected) { [ {:name => "Jones"} ]             }

      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_autonum.rb
alf-core-0.14.0 spec/unit/alf-update/inserter/test_autonum.rb
alf-core-0.13.1 spec/unit/alf-update/inserter/test_autonum.rb
alf-core-0.13.0 spec/unit/alf-update/inserter/test_autonum.rb