mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #3456 from coopdevs/fix-last-orders-controller-spec
Fix orders controller spec
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user