Sha256: 4cbbc56e1424f6c2d52a26c2394fff02b5744670f379857e4ab8c42786120e2c

Contents?: true

Size: 496 Bytes

Versions: 4

Compression:

Stored size: 496 Bytes

Contents

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

      let(:expr)     { rank(suppliers, [[:name, :asc]], :rank) }
      let(:inserted) { [ {:rank => 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_rank.rb
alf-core-0.14.0 spec/unit/alf-update/inserter/test_rank.rb
alf-core-0.13.1 spec/unit/alf-update/inserter/test_rank.rb
alf-core-0.13.0 spec/unit/alf-update/inserter/test_rank.rb