mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
Fix "Resend Confirmation" link and add missing test coverage
This commit is contained in:
@@ -62,7 +62,6 @@ module Spree
|
||||
{ name: t(:resend_confirmation),
|
||||
url: spree.resend_admin_order_path(@order),
|
||||
icon: 'icon-email',
|
||||
method: 'post',
|
||||
confirm: t(:confirm_resend_order_confirmation) }
|
||||
end
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ Spree::Core::Engine.routes.draw do
|
||||
member do
|
||||
put :fire
|
||||
get :fire
|
||||
post :resend
|
||||
get :resend
|
||||
get :invoice
|
||||
get :print
|
||||
get :distribution
|
||||
|
||||
@@ -611,6 +611,24 @@ describe '
|
||||
href: spree.fire_admin_order_path(order, e: 'cancel')
|
||||
end
|
||||
end
|
||||
|
||||
context "Resending confirmation email" do
|
||||
before do
|
||||
visit spree.edit_admin_order_path(order)
|
||||
find("#links-dropdown .ofn-drop-down").click
|
||||
end
|
||||
|
||||
it "shows the link" do
|
||||
expect(page).to have_link "Resend Confirmation", href: spree.resend_admin_order_path(order)
|
||||
end
|
||||
|
||||
it "resends the confirmation email" do
|
||||
accept_alert "Are you sure you want to resend the order confirmation email?" do
|
||||
click_link "Resend Confirmation"
|
||||
end
|
||||
expect(page).to have_content "Order email has been resent"
|
||||
end
|
||||
end
|
||||
|
||||
context "Check send/print invoice links" do
|
||||
|
||||
|
||||
Reference in New Issue
Block a user