Use :order_with_totals factory in payments controller spec

This factory makes an order that actually has a line item 👍
This commit is contained in:
Matt-Yorkley
2021-05-21 13:01:24 +01:00
parent 7007de752d
commit 00988dc1e7

View File

@@ -311,7 +311,7 @@ describe Spree::Admin::PaymentsController, type: :controller do
end
context "the order contains an item that is out of stock" do
let!(:order) { create(:order, distributor: shop, state: 'payment') }
let!(:order) { create(:order_with_totals, distributor: shop, state: 'payment') }
before do
order.line_items.first.variant.update_attribute(:on_hand, 0)