From acf7c0c4d8e3075b830d2581b617d393c2250bfb Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Thu, 20 May 2021 13:58:46 +0100 Subject: [PATCH] Use :order_with_totals factory in CustomersController spec --- spec/controllers/admin/customers_controller_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/controllers/admin/customers_controller_spec.rb b/spec/controllers/admin/customers_controller_spec.rb index 5afdcd6d50..b8271ff27c 100644 --- a/spec/controllers/admin/customers_controller_spec.rb +++ b/spec/controllers/admin/customers_controller_spec.rb @@ -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