Sha256: fe6777659405ede0ab9df772593c82486242f6654bb2132e33874ed0afb78569

Contents?: true

Size: 693 Bytes

Versions: 4

Compression:

Stored size: 693 Bytes

Contents

require 'update_helper'
module Alf
  module Update
    describe Deleter, 'group' do

      let(:expr){ group(suppliers, [:city], :foo) }

      subject{ delete(expr, predicate) }

      context 'pass-through' do
        let(:predicate){ Predicate.eq(:id => 1) }

        it 'requests the deletion on :suppliers' do
          subject
          db_context.requests.should eq([ [:delete, :suppliers, predicate] ])
        end
      end

      context 'non pass-through' do
        let(:predicate){ Predicate.eq(:foo => 1) }

        it 'requests the deletion on :suppliers' do
          pending "need for Predicate.in" do
            subject
          end
        end
      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/deleter/test_group.rb
alf-core-0.14.0 spec/unit/alf-update/deleter/test_group.rb
alf-core-0.13.1 spec/unit/alf-update/deleter/test_group.rb
alf-core-0.13.0 spec/unit/alf-update/deleter/test_group.rb