mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user