mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-10 23:07:47 +00:00
Fix spec to assert updating shipments
The spec was asserting on all shipments of the order but there were one. In consequence, the spec didn't assert anything. Now I set up a shipment that is asserted on. I'm stil not sure how useful this spec is though.
This commit is contained in:
@@ -229,10 +229,12 @@ RSpec.describe Spree::Order do
|
||||
end
|
||||
|
||||
it "should sell inventory units" do
|
||||
order.shipments.each do |shipment|
|
||||
expect(shipment).to receive(:update!)
|
||||
expect(shipment).to receive(:finalize!)
|
||||
end
|
||||
shipment = Spree::Shipment.new
|
||||
order.shipments = [shipment]
|
||||
|
||||
expect(shipment).to receive(:update!).with(order)
|
||||
expect(shipment).to receive(:finalize!)
|
||||
|
||||
order.finalize!
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user