mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-13 23:37:47 +00:00
Replace stub with allow in checkout_controller_spec
This commit is contained in:
@@ -93,10 +93,10 @@ describe CheckoutController, type: :controller do
|
||||
allow(ResetOrderService).to receive(:new).with(controller, order) { reset_order_service }
|
||||
allow(reset_order_service).to receive(:call)
|
||||
allow(order).to receive(:update_attributes).and_return true
|
||||
controller.stub(:current_order).and_return(order)
|
||||
allow(controller).to receive(:current_order).and_return order
|
||||
|
||||
# make order workflow pass through delivery
|
||||
order.stub(:next).twice do
|
||||
allow(order).to receive(:next).twice do
|
||||
if order.state == 'cart'
|
||||
order.update_column :state, 'delivery'
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user