Replace link with button in author_actions

- modified corresponding spec
This commit is contained in:
cyrillefr
2025-04-04 11:53:20 +02:00
parent c6f0a3761b
commit 30979b2e96
2 changed files with 6 additions and 6 deletions

View File

@@ -7,7 +7,7 @@
edit_budget_investment_path(investment.budget, investment), edit_budget_investment_path(investment.budget, investment),
method: :get, class: "button hollow expanded" %> method: :get, class: "button hollow expanded" %>
<% else %> <% else %>
<%= link_to image_path(investment.image), <%= button_to image_path(investment.image),
method: :delete, method: :delete,
class: "button hollow alert expanded" do %> class: "button hollow alert expanded" do %>
<span class="icon-image"></span> <span class="icon-image"></span>

View File

@@ -1715,7 +1715,7 @@ describe "Budget Investments" do
within("aside") do within("aside") do
expect(page).not_to have_content "Author" expect(page).not_to have_content "Author"
expect(page).not_to have_link "Edit" 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
end end
@@ -1728,7 +1728,7 @@ describe "Budget Investments" do
within("aside") do within("aside") do
expect(page).to have_content "AUTHOR" expect(page).to have_content "AUTHOR"
expect(page).to have_link "Edit" expect(page).to have_link "Edit"
expect(page).not_to have_link "Remove image" expect(page).not_to have_button "Remove image"
end end
end end
@@ -1742,7 +1742,7 @@ describe "Budget Investments" do
within("aside") do within("aside") do
expect(page).to have_content "AUTHOR" expect(page).to have_content "AUTHOR"
expect(page).not_to have_link "Edit" expect(page).not_to have_link "Edit"
expect(page).to have_link "Remove image" expect(page).to have_button "Remove image"
end end
end end
end end