Merge pull request #3456 from coopdevs/fix-last-orders-controller-spec

Fix orders controller spec
This commit is contained in:
Pau Pérez Fabregat
2019-02-12 12:47:15 +01:00
committed by GitHub

View File

@@ -224,7 +224,16 @@ describe Spree::OrdersController, type: :controller do
} }
}
expect(order.adjustments.map(&:state)).to eq(['closed', 'closed', 'closed'])
# Before issuing the update, the second adjustment, which is associated
# to the shipment, is already open thus restoring its state leaves it
# also open.
#
# The third adjustment is originated from an EnterpriseFee and it gets
# created by #update_distribution_charge! in
# app/models/spree/order_decorator.rb:220, which is in turn triggered
# by the `contents_changed` notification event defined in
# app/models/spree/order_decorator.rb:7
expect(order.adjustments.map(&:state)).to eq(['closed', 'open', 'closed'])
end
end