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:
Maikel Linke
2024-07-02 13:29:58 +10:00
parent 94d560d341
commit cb4e7d6fe3

View File

@@ -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