Replace link with button in author_actions
- modified corresponding spec
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
edit_budget_investment_path(investment.budget, investment),
|
||||
method: :get, class: "button hollow expanded" %>
|
||||
<% else %>
|
||||
<%= link_to image_path(investment.image),
|
||||
<%= button_to image_path(investment.image),
|
||||
method: :delete,
|
||||
class: "button hollow alert expanded" do %>
|
||||
<span class="icon-image"></span>
|
||||
|
||||
@@ -1715,7 +1715,7 @@ describe "Budget Investments" do
|
||||
within("aside") do
|
||||
expect(page).not_to have_content "Author"
|
||||
expect(page).not_to have_link "Edit"
|
||||
expect(page).not_to have_link "Remove image"
|
||||
expect(page).not_to have_button "Remove image"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1728,7 +1728,7 @@ describe "Budget Investments" do
|
||||
within("aside") do
|
||||
expect(page).to have_content "AUTHOR"
|
||||
expect(page).to have_link "Edit"
|
||||
expect(page).not_to have_link "Remove image"
|
||||
expect(page).not_to have_button "Remove image"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1742,7 +1742,7 @@ describe "Budget Investments" do
|
||||
within("aside") do
|
||||
expect(page).to have_content "AUTHOR"
|
||||
expect(page).not_to have_link "Edit"
|
||||
expect(page).to have_link "Remove image"
|
||||
expect(page).to have_button "Remove image"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user