mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Merge pull request #13065 from mkllnk/dfc-amend-nothing
Admin updates can trigger new backorders until the order cycle is closed
This commit is contained in:
23
spec/system/consumer/checkout/backorder_spec.rb
Normal file
23
spec/system/consumer/checkout/backorder_spec.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "system_helper"
|
||||
|
||||
RSpec.describe "Checkout" do
|
||||
include ShopWorkflow
|
||||
include CheckoutHelper
|
||||
|
||||
let(:variant) { order.variants.first }
|
||||
let(:order) { create(:order_ready_for_confirmation) }
|
||||
|
||||
before do
|
||||
variant.semantic_links << SemanticLink.new(semantic_id: "https://product")
|
||||
set_order order
|
||||
login_as create(:user)
|
||||
end
|
||||
|
||||
it "triggers a backorder" do
|
||||
visit checkout_step_path(:summary)
|
||||
|
||||
expect { place_order }.to enqueue_job BackorderJob
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user