Use buttons to send notifications and newsletters
As mentioned in commits5311daadfandbb958daf0, using links combined with JavaScript to generate POST requests to the server has a few issues.
This commit is contained in:
@@ -190,7 +190,7 @@ describe "Admin Notifications", :admin do
|
||||
|
||||
visit admin_admin_notification_path(notification)
|
||||
|
||||
accept_confirm { click_link "Send notification" }
|
||||
accept_confirm { click_button "Send notification" }
|
||||
|
||||
expect(page).to have_content "Notification sent successfully"
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ describe "Admin newsletter emails", :admin do
|
||||
newsletter = create(:newsletter)
|
||||
visit admin_newsletter_path(newsletter)
|
||||
|
||||
accept_confirm { click_link "Send" }
|
||||
accept_confirm { click_button "Send" }
|
||||
|
||||
expect(page).to have_content "Newsletter sent successfully"
|
||||
end
|
||||
@@ -153,7 +153,7 @@ describe "Admin newsletter emails", :admin do
|
||||
newsletter = create(:newsletter, segment_recipient: "administrators")
|
||||
visit admin_newsletter_path(newsletter)
|
||||
|
||||
accept_confirm { click_link "Send" }
|
||||
accept_confirm { click_button "Send" }
|
||||
|
||||
expect(page).to have_content "Newsletter sent successfully"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user