Sha256: 7f45814d85bcf1b751631487cbe3e1b5f2576120a1ca7f6239a43a1c0d11854a

Contents?: true

Size: 304 Bytes

Versions: 21

Compression:

Stored size: 304 Bytes

Contents

# frozen_string_literal: true

FactoryBot.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

21 entries across 21 versions & 1 rubygems

Version Path
solidus_core-4.3.4 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.2.4 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.1.5 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.3.3 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.3.2 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.1.4 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.3.1 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.3.0 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.2.3 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.1.3 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.0.4 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.0.3 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.1.2 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.2.2 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.2.1 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.2.0 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.1.1 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.0.2 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.0.1 lib/spree/testing_support/factories/stock_item_factory.rb
solidus_core-4.1.0 lib/spree/testing_support/factories/stock_item_factory.rb