Sha256: 347dca85bebaeb37d04d68145c202565e5bbb23cf3bc176d5db2ed21483af91b

Contents?: true

Size: 507 Bytes

Versions: 10

Compression:

Stored size: 507 Bytes

Contents

require 'spec_helper'

describe Spree::Order, :type => :model do
  let(:order) { create(:order) }

  context "#update_with_updater!" do
    let(:line_items) { [mock_model(Spree::LineItem, :amount => 5) ]}

    context "when there are update hooks" do
      before { Spree::Order.register_update_hook :foo }
      after { Spree::Order.update_hooks.clear }
      it "should call each of the update hooks" do
        expect(order).to receive :foo
        order.update_with_updater!
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spree_core-3.1.5 spec/models/spree/order/updating_spec.rb
spree_core-3.1.4 spec/models/spree/order/updating_spec.rb
spree_core-3.1.3 spec/models/spree/order/updating_spec.rb
spree_core-3.1.2 spec/models/spree/order/updating_spec.rb
spree_core-3.1.1 spec/models/spree/order/updating_spec.rb
spree_core-3.1.0 spec/models/spree/order/updating_spec.rb
spree_core-3.1.0.rc4 spec/models/spree/order/updating_spec.rb
spree_core-3.1.0.rc3 spec/models/spree/order/updating_spec.rb
spree_core-3.1.0.rc2 spec/models/spree/order/updating_spec.rb
spree_core-3.1.0.rc1 spec/models/spree/order/updating_spec.rb