Replace link with button in mailing options
This commit is contained in:
@@ -5,8 +5,7 @@
|
|||||||
class: "button expanded" %>
|
class: "button expanded" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= link_to t("dashboard.mailing.mailing_options.send", address: current_user.email),
|
<%= button_to t("dashboard.mailing.mailing_options.send", address: current_user.email),
|
||||||
proposal_dashboard_mailing_index_path(proposal),
|
proposal_dashboard_mailing_index_path(proposal),
|
||||||
method: :post,
|
|
||||||
class: "button expanded" %>
|
class: "button expanded" %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ describe "Mailing" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
scenario "Has a link to send the mail" do
|
scenario "Has a link to send the mail" do
|
||||||
expect(page).to have_link("Send to #{proposal.author.email}")
|
expect(page).to have_button("Send to #{proposal.author.email}")
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "User receives feedback after the email is sent" do
|
scenario "User receives feedback after the email is sent" do
|
||||||
click_link "Send to #{proposal.author.email}"
|
click_button "Send to #{proposal.author.email}"
|
||||||
expect(page).to have_content("The email has been sent")
|
expect(page).to have_content("The email has been sent")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -31,6 +31,6 @@ describe "Mailing" do
|
|||||||
click_link "Preview"
|
click_link "Preview"
|
||||||
|
|
||||||
expect(page).not_to have_link("Preview")
|
expect(page).not_to have_link("Preview")
|
||||||
expect(page).to have_link("Send to #{proposal.author.email}")
|
expect(page).to have_button("Send to #{proposal.author.email}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user