Use :order_with_totals factory in CustomersController spec

This commit is contained in:
Matt-Yorkley
2021-05-20 13:58:46 +01:00
parent 443b180f32
commit acf7c0c4d8

View File

@@ -108,8 +108,7 @@ module Admin
end
context 'when the customer has an order with a void payment' do
let(:order) { create(:order, customer: customer, state: 'complete') }
let!(:line_item) { create(:line_item, order: order, price: 10.0) }
let(:order) { create(:order_with_totals, customer: customer, state: 'complete') }
let!(:payment) { create(:payment, order: order, amount: order.total) }
before do