Sha256: 78da65acce75f5625c100db58d3ffbe81d17efa1763f4d82d974e35cd647e06b

Contents?: true

Size: 491 Bytes

Versions: 16

Compression:

Stored size: 491 Bytes

Contents

require 'spec_helper'

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

  context "#update!" 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!
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
solidus_core-1.2.3 spec/models/spree/order/updating_spec.rb
solidus_core-1.1.4 spec/models/spree/order/updating_spec.rb
solidus_core-1.0.7 spec/models/spree/order/updating_spec.rb
solidus_core-1.0.6 spec/models/spree/order/updating_spec.rb
solidus_core-1.2.2 spec/models/spree/order/updating_spec.rb
solidus_core-1.2.1 spec/models/spree/order/updating_spec.rb
solidus_core-1.1.3 spec/models/spree/order/updating_spec.rb
solidus_core-1.0.5 spec/models/spree/order/updating_spec.rb
solidus_core-1.2.0 spec/models/spree/order/updating_spec.rb
solidus_core-1.2.0.rc2 spec/models/spree/order/updating_spec.rb
solidus_core-1.0.4 spec/models/spree/order/updating_spec.rb
solidus_core-1.1.2 spec/models/spree/order/updating_spec.rb
solidus_core-1.2.0.rc1 spec/models/spree/order/updating_spec.rb
solidus_core-1.2.0.beta1 spec/models/spree/order/updating_spec.rb
solidus_core-1.0.3 spec/models/spree/order/updating_spec.rb
solidus_core-1.1.1 spec/models/spree/order/updating_spec.rb