Sha256: 5e31c5fb057990c6d2086ae90419cbb0c21d1bce38dbbd7e280ba534f5c865ca
Contents?: true
Size: 601 Bytes
Versions: 1
Compression:
Stored size: 601 Bytes
Contents
FactoryGirl.define do factory :return_item, class: Spree::ReturnItem do association(:inventory_unit, factory: :inventory_unit, state: :shipped) return_authorization do |return_item| build(:return_authorization, order: inventory_unit.order) end factory :exchange_return_item do after(:build) do |return_item| # set track_inventory to false to ensure it passes the in_stock check return_item.inventory_unit.variant.update_column(:track_inventory, false) return_item.exchange_variant = return_item.inventory_unit.variant end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
solidus_core-1.0.0.pre | lib/spree/testing_support/factories/return_item_factory.rb |