Replace i18n destroy to delete
This commit is contained in:
@@ -106,8 +106,8 @@ en:
|
|||||||
blank_dates: Dates are blank
|
blank_dates: Dates are blank
|
||||||
destroy:
|
destroy:
|
||||||
success_notice: Budget deleted successfully
|
success_notice: Budget deleted successfully
|
||||||
unable_notice: You cannot destroy a budget that has associated investments
|
unable_notice: You cannot delete a budget that has associated investments
|
||||||
unable_notice_polls: You cannot destroy a budget that has an associated poll
|
unable_notice_polls: You cannot delete a budget that has an associated poll
|
||||||
new:
|
new:
|
||||||
title: New participatory budget
|
title: New participatory budget
|
||||||
winners:
|
winners:
|
||||||
@@ -130,7 +130,7 @@ en:
|
|||||||
notice: "Group updated successfully"
|
notice: "Group updated successfully"
|
||||||
destroy:
|
destroy:
|
||||||
success_notice: "Group deleted successfully"
|
success_notice: "Group deleted successfully"
|
||||||
unable_notice: "You cannot destroy a Group that has associated headings"
|
unable_notice: "You cannot delete a Group that has associated headings"
|
||||||
form:
|
form:
|
||||||
create: "Create new group"
|
create: "Create new group"
|
||||||
edit: "Edit group"
|
edit: "Edit group"
|
||||||
@@ -150,7 +150,7 @@ en:
|
|||||||
notice: "Heading updated successfully"
|
notice: "Heading updated successfully"
|
||||||
destroy:
|
destroy:
|
||||||
success_notice: "Heading deleted successfully"
|
success_notice: "Heading deleted successfully"
|
||||||
unable_notice: "You cannot destroy a Heading that has associated investments"
|
unable_notice: "You cannot delete a Heading that has associated investments"
|
||||||
form:
|
form:
|
||||||
name: "Heading name"
|
name: "Heading name"
|
||||||
amount: "Amount"
|
amount: "Amount"
|
||||||
@@ -1507,7 +1507,7 @@ en:
|
|||||||
origin_total: Total participants
|
origin_total: Total participants
|
||||||
tags:
|
tags:
|
||||||
create: Create topic
|
create: Create topic
|
||||||
destroy: Destroy topic
|
destroy: Delete topic
|
||||||
index:
|
index:
|
||||||
add_tag: Add a new proposal topic
|
add_tag: Add a new proposal topic
|
||||||
title: Proposal topics
|
title: Proposal topics
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ en:
|
|||||||
new_topic: Create topic
|
new_topic: Create topic
|
||||||
topic:
|
topic:
|
||||||
edit: Edit topic
|
edit: Edit topic
|
||||||
destroy: Destroy topic
|
destroy: Delete topic
|
||||||
comments:
|
comments:
|
||||||
one: 1 comment
|
one: 1 comment
|
||||||
other: "%{count} comments"
|
other: "%{count} comments"
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ en:
|
|||||||
actions:
|
actions:
|
||||||
destroy:
|
destroy:
|
||||||
notice: Document was deleted successfully.
|
notice: Document was deleted successfully.
|
||||||
alert: Cannot destroy document.
|
alert: Cannot delete document.
|
||||||
confirm: Are you sure you want to delete the document? This action cannot be undone!
|
confirm: Are you sure you want to delete the document? This action cannot be undone!
|
||||||
buttons:
|
buttons:
|
||||||
download_document: Download file
|
download_document: Download file
|
||||||
destroy_document: Destroy document
|
destroy_document: Delete document
|
||||||
errors:
|
errors:
|
||||||
messages:
|
messages:
|
||||||
in_between: must be in between %{min} and %{max}
|
in_between: must be in between %{min} and %{max}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ en:
|
|||||||
actions:
|
actions:
|
||||||
destroy:
|
destroy:
|
||||||
notice: Image was deleted successfully.
|
notice: Image was deleted successfully.
|
||||||
alert: Cannot destroy image.
|
alert: Cannot delete image.
|
||||||
errors:
|
errors:
|
||||||
messages:
|
messages:
|
||||||
in_between: must be in between %{min} and %{max}
|
in_between: must be in between %{min} and %{max}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ feature "Admin budget groups" do
|
|||||||
visit admin_budget_groups_path(budget)
|
visit admin_budget_groups_path(budget)
|
||||||
within("#budget_group_#{group.id}") { click_link "Delete" }
|
within("#budget_group_#{group.id}") { click_link "Delete" }
|
||||||
|
|
||||||
expect(page).to have_content "You cannot destroy a Group that has associated headings"
|
expect(page).to have_content "You cannot delete a Group that has associated headings"
|
||||||
expect(page).to have_selector "#budget_group_#{group.id}"
|
expect(page).to have_selector "#budget_group_#{group.id}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ feature "Admin budget headings" do
|
|||||||
visit admin_budget_group_headings_path(budget, group)
|
visit admin_budget_group_headings_path(budget, group)
|
||||||
within("#budget_heading_#{heading.id}") { click_link "Delete" }
|
within("#budget_heading_#{heading.id}") { click_link "Delete" }
|
||||||
|
|
||||||
expect(page).to have_content "You cannot destroy a Heading that has associated investments"
|
expect(page).to have_content "You cannot delete a Heading that has associated investments"
|
||||||
expect(page).to have_selector "#budget_heading_#{heading.id}"
|
expect(page).to have_selector "#budget_heading_#{heading.id}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ feature "Admin budgets" do
|
|||||||
click_link "Edit budget"
|
click_link "Edit budget"
|
||||||
click_link "Delete budget"
|
click_link "Delete budget"
|
||||||
|
|
||||||
expect(page).to have_content("You cannot destroy a budget that has associated investments")
|
expect(page).to have_content("You cannot delete a budget that has associated investments")
|
||||||
expect(page).to have_content("There is 1 budget")
|
expect(page).to have_content("There is 1 budget")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ feature "Admin budgets" do
|
|||||||
visit edit_admin_budget_path(budget)
|
visit edit_admin_budget_path(budget)
|
||||||
click_link "Delete budget"
|
click_link "Delete budget"
|
||||||
|
|
||||||
expect(page).to have_content("You cannot destroy a budget that has an associated poll")
|
expect(page).to have_content("You cannot delete a budget that has an associated poll")
|
||||||
expect(page).to have_content("There is 1 budget")
|
expect(page).to have_content("There is 1 budget")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ feature "Admin tags" do
|
|||||||
expect(page).to have_content tag2.name
|
expect(page).to have_content tag2.name
|
||||||
|
|
||||||
within("#tag_#{tag2.id}") do
|
within("#tag_#{tag2.id}") do
|
||||||
click_link "Destroy topic"
|
click_link "Delete topic"
|
||||||
end
|
end
|
||||||
|
|
||||||
visit admin_tags_path
|
visit admin_tags_path
|
||||||
@@ -59,7 +59,7 @@ feature "Admin tags" do
|
|||||||
expect(page).to have_content tag2.name
|
expect(page).to have_content tag2.name
|
||||||
|
|
||||||
within("#tag_#{tag2.id}") do
|
within("#tag_#{tag2.id}") do
|
||||||
click_link "Destroy topic"
|
click_link "Delete topic"
|
||||||
end
|
end
|
||||||
|
|
||||||
visit admin_tags_path
|
visit admin_tags_path
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ feature "Topics" do
|
|||||||
login_as(user)
|
login_as(user)
|
||||||
visit community_topic_path(community, topic)
|
visit community_topic_path(community, topic)
|
||||||
|
|
||||||
click_link "Destroy topic"
|
click_link "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
|
||||||
@@ -153,7 +153,7 @@ feature "Topics" do
|
|||||||
|
|
||||||
visit community_path(community)
|
visit community_path(community)
|
||||||
|
|
||||||
expect(page).not_to have_link "Destroy"
|
expect(page).not_to have_link "Delete"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -42,28 +42,28 @@ shared_examples "documentable" do |documentable_factory_name,
|
|||||||
scenario "Should not be able when no user logged in" do
|
scenario "Should not be able when no user logged in" do
|
||||||
visit send(documentable_path, arguments)
|
visit send(documentable_path, arguments)
|
||||||
|
|
||||||
expect(page).not_to have_link("Destroy document")
|
expect(page).not_to have_link("Delete document")
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Should be able when documentable author is logged in" do
|
scenario "Should be able when documentable author is logged in" do
|
||||||
login_as documentable.author
|
login_as documentable.author
|
||||||
visit send(documentable_path, arguments)
|
visit send(documentable_path, arguments)
|
||||||
|
|
||||||
expect(page).to have_link("Destroy document")
|
expect(page).to have_link("Delete document")
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Administrators cannot destroy documentables they have not authored" do
|
scenario "Administrators cannot destroy documentables they have not authored" do
|
||||||
login_as(administrator)
|
login_as(administrator)
|
||||||
visit send(documentable_path, arguments)
|
visit send(documentable_path, arguments)
|
||||||
|
|
||||||
expect(page).not_to have_link("Destroy document")
|
expect(page).not_to have_link("Delete document")
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Users cannot destroy documentables they have not authored" do
|
scenario "Users cannot destroy documentables they have not authored" do
|
||||||
login_as(create(:user))
|
login_as(create(:user))
|
||||||
visit send(documentable_path, arguments)
|
visit send(documentable_path, arguments)
|
||||||
|
|
||||||
expect(page).not_to have_link("Destroy document")
|
expect(page).not_to have_link("Delete document")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -122,7 +122,7 @@ shared_examples "documentable" do |documentable_factory_name,
|
|||||||
visit send(documentable_path, arguments)
|
visit send(documentable_path, arguments)
|
||||||
|
|
||||||
within "#document_#{document.id}" do
|
within "#document_#{document.id}" do
|
||||||
click_on "Destroy document"
|
click_on "Delete document"
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_content "Document was deleted successfully."
|
expect(page).to have_content "Document was deleted successfully."
|
||||||
@@ -134,7 +134,7 @@ shared_examples "documentable" do |documentable_factory_name,
|
|||||||
visit send(documentable_path, arguments)
|
visit send(documentable_path, arguments)
|
||||||
|
|
||||||
within "#document_#{document.id}" do
|
within "#document_#{document.id}" do
|
||||||
click_on "Destroy document"
|
click_on "Delete document"
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(page).not_to have_content "Documents (0)"
|
expect(page).not_to have_content "Documents (0)"
|
||||||
@@ -146,7 +146,7 @@ shared_examples "documentable" do |documentable_factory_name,
|
|||||||
visit send(documentable_path, arguments)
|
visit send(documentable_path, arguments)
|
||||||
|
|
||||||
within "#document_#{document.id}" do
|
within "#document_#{document.id}" do
|
||||||
click_on "Destroy document"
|
click_on "Delete document"
|
||||||
end
|
end
|
||||||
|
|
||||||
within "##{dom_id(documentable)}" do
|
within "##{dom_id(documentable)}" do
|
||||||
|
|||||||
Reference in New Issue
Block a user