Replace link with button in Topics show
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
edit_community_topic_path(@community.id, @topic),
|
||||
class: "button hollow expanded" %>
|
||||
|
||||
<%= link_to t("community.show.topic.destroy"),
|
||||
<%= button_to t("community.show.topic.destroy"),
|
||||
community_topic_path(@community.id, @topic),
|
||||
method: :delete,
|
||||
class: "button hollow expanded alert" %>
|
||||
|
||||
@@ -131,7 +131,7 @@ describe "Topics" do
|
||||
login_as(user)
|
||||
visit community_topic_path(topic.community, topic)
|
||||
|
||||
click_link "Delete topic"
|
||||
click_button "Delete topic"
|
||||
|
||||
expect(page).to have_content "Topic deleted successfully."
|
||||
expect(page).not_to have_content topic.title
|
||||
|
||||
Reference in New Issue
Block a user