mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #8192 from Matt-Yorkley/orders-path-issue
Fix order_path issue in cart page
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user