Bring missing factory from spree_core and use ofn's calculator

This commit is contained in:
Luis Ramos
2020-09-03 22:52:17 +01:00
parent 4931edc67c
commit 8867ec977c
2 changed files with 10 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
FactoryBot.define do
factory :return_authorization, class: Spree::ReturnAuthorization do
number '100'
amount 100.00
association(:order, factory: :shipped_order)
reason 'no particular reason'
state 'received'
end
end

View File

@@ -245,7 +245,7 @@ module Spree
let!(:zone) { create(:zone_with_member) }
let!(:order) { create(:order, bill_address: create(:address)) }
let!(:line_item) { create(:line_item, order: order) }
let(:tax_rate) { create(:tax_rate, included_in_price: true, calculator: Calculator::FlatRate.new(preferred_amount: 0.1)) }
let(:tax_rate) { create(:tax_rate, included_in_price: true, calculator: ::Calculator::FlatRate.new(preferred_amount: 0.1)) }
let(:adjustment) { line_item.adjustments(:reload).first }
before do