Sha256: 592c96bbcac844d494cb0cbe41a8c3cd17c4bc62b2b046f266f5f31fa92cd2c5
Contents?: true
Size: 508 Bytes
Versions: 4
Compression:
Stored size: 508 Bytes
Contents
FactoryGirl.define do factory :reimbursement, class: Spree::Reimbursement do transient 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
4 entries across 4 versions & 1 rubygems