mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix failing specs
This commit is contained in:
committed by
Maikel Linke
parent
bb9d835bd8
commit
a1ad25f217
@@ -275,7 +275,7 @@ describe SplitCheckoutController, type: :controller do
|
||||
context "when adding fails" do
|
||||
it "returns 422 and an error message" do
|
||||
# Makes adding the voucher fails
|
||||
allow(voucher).to receive(:compute_amount).and_return(0)
|
||||
allow(voucher).to receive(:create_adjustment).and_return(nil)
|
||||
allow(Voucher).to receive(:find_by).and_return(voucher)
|
||||
|
||||
put :update, params: params
|
||||
|
||||
@@ -1115,6 +1115,8 @@ describe "As a consumer, I want to checkout my order" do
|
||||
before do
|
||||
# Add voucher to the order
|
||||
voucher.create_adjustment(voucher.code, order)
|
||||
# Update order so voucher adjustment is properly taken into account
|
||||
order.update_order!
|
||||
|
||||
visit checkout_step_path(:summary)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user