-
-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13065 from mkllnk/dfc-amend-nothing
Admin updates can trigger new backorders until the order cycle is closed
- Loading branch information
Showing
7 changed files
with
110 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |