Merge pull request #8192 from Matt-Yorkley/orders-path-issue

Fix order_path issue in cart page
This commit is contained in:
Matt-Yorkley
2021-09-16 16:16:36 +02:00
committed by GitHub
2 changed files with 11 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ module Spree
end
def changeable_orders_link_path
changeable_orders.one? ? order_path(changeable_orders.first) : spree.account_path
changeable_orders.one? ? main_app.order_path(changeable_orders.first) : spree.account_path
end
def shop_changeable_orders_alert_html

View File

@@ -315,6 +315,16 @@ feature "full-page cart", js: true do
expect(page).to have_no_content item1.variant.name
expect(page).to have_content item2.variant.name
end
context "with a single editable order" do # Regression test for #8191
before do
prev_order2.destroy
end
it "doesn't throw an error" do
expect{ visit main_app.cart_path }.to_not raise_error
end
end
end
end
end