Sha256: c106910a8ea390cd2463d29885626c20a0b09ae0b0ba1852730cc4f5b53a036d

Contents?: true

Size: 392 Bytes

Versions: 39

Compression:

Stored size: 392 Bytes

Contents

require 'spree/testing_support/factories/stock_location_factory'
require 'spree/testing_support/factories/variant_factory'

FactoryGirl.define do
  factory :stock_item, class: Spree::StockItem do
    backorderable true
    association :stock_location, factory: :stock_location_without_variant_propagation
    variant

    after(:create) { |object| object.adjust_count_on_hand(10) }
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
solidus_core-2.3.1 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.2.2 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.1.1 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.0.3 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-1.4.2 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-1.3.2 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-1.2.3 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.3.0 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.3.0.rc3 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.3.0.rc2 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.3.0.rc1 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.3.0.beta1 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.0.2 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-1.4.1 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.2.1 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.2.0 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.2.0.rc1 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.2.0.beta1 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.1.0 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-2.1.0.rc1 lib/spree/testing_support/factories/stock_item_factory.rb