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),
|
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>
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user