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