Sha256: 6774a54a952fa6bbbd499cfd6a7b23a5420377c962c2f93379f2b8a5a90cd1d5

Contents?: true

Size: 686 Bytes

Versions: 2

Compression:

Stored size: 686 Bytes

Contents

require 'spec_helper'
module Alf
  module Relvar
    describe Virtual, "update" do

      let(:rv)        { Virtual.new(expr)                       }
      let(:expr)      { Algebra.named_operand(:suppliers, self) }
      let(:updating)  { {sname: 'Jones'}                        }
      let(:predicate) { Predicate.eq(:sid, 1)                   }

      def update(*args)
        @seen = args
      end

      def relvar(name)
        Relvar::Base.new(name, connection)
      end

      subject{ rv.update(updating, predicate) }

      it 'delegates the call to the connection' do
        subject
        @seen.should eq([:suppliers, updating, predicate])
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-relvar/virtual/test_update.rb
alf-core-0.14.0 spec/unit/alf-relvar/virtual/test_update.rb