Sha256: c4d364f821e1a6ac10f98c8ca9e14e710a7c28fd61a8b07b358d89e3baddfcaf
Contents?: true
Size: 504 Bytes
Versions: 2
Compression:
Stored size: 504 Bytes
Contents
FactoryGirl.define do factory :reimbursement, class: Spree::Reimbursement do ignore do return_items_count 1 end customer_return { create(:customer_return_with_accepted_items, line_items_count: return_items_count) } before(:create) do |reimbursement, evaluator| reimbursement.order ||= reimbursement.customer_return.order if reimbursement.return_items.empty? reimbursement.return_items = reimbursement.customer_return.return_items end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree_core-2.4.0.rc2 | lib/spree/testing_support/factories/reimbursement_factory.rb |
spree_core-2.4.0.rc1 | lib/spree/testing_support/factories/reimbursement_factory.rb |