displays message about receivers
This commit is contained in:
@@ -4,6 +4,14 @@
|
|||||||
|
|
||||||
<h1><%= t("proposal_notifications.new.title") %></h1>
|
<h1><%= t("proposal_notifications.new.title") %></h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<%= t("proposal_notifications.new.info_about_receivers",
|
||||||
|
count: @proposal.voters.count) %>
|
||||||
|
|
||||||
|
<%= link_to t("proposal_notifications.new.proposal_page"),
|
||||||
|
proposal_path(@proposal) %>
|
||||||
|
</p>
|
||||||
|
|
||||||
<%= form_for @notification do |f| %>
|
<%= form_for @notification do |f| %>
|
||||||
<%= render "shared/errors", resource: @notification %>
|
<%= render "shared/errors", resource: @notification %>
|
||||||
|
|
||||||
|
|||||||
@@ -368,6 +368,8 @@ en:
|
|||||||
title_label: "Title"
|
title_label: "Title"
|
||||||
body_label: "Message"
|
body_label: "Message"
|
||||||
submit_button: "Send message"
|
submit_button: "Send message"
|
||||||
|
info_about_receivers: "This message will be send to %{count} people and it will be visible in "
|
||||||
|
proposal_page: "the proposal's page"
|
||||||
show:
|
show:
|
||||||
back: "Go back to my activity"
|
back: "Go back to my activity"
|
||||||
shared:
|
shared:
|
||||||
|
|||||||
@@ -368,6 +368,8 @@ es:
|
|||||||
title_label: "Título"
|
title_label: "Título"
|
||||||
body_label: "Mensaje"
|
body_label: "Mensaje"
|
||||||
submit_button: "Enviar mensaje"
|
submit_button: "Enviar mensaje"
|
||||||
|
info_about_receivers: "Este mensaje se enviará a %{count} usuarios y se publicará en "
|
||||||
|
proposal_page: "la página de la propuesta"
|
||||||
show:
|
show:
|
||||||
back: "Volver a mi actividad"
|
back: "Volver a mi actividad"
|
||||||
shared:
|
shared:
|
||||||
|
|||||||
@@ -38,6 +38,19 @@ feature 'Proposal Notifications' do
|
|||||||
expect(page).to have_content "We are almost there please share with your peoples!"
|
expect(page).to have_content "We are almost there please share with your peoples!"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scenario "Message about receivers" do
|
||||||
|
author = create(:user)
|
||||||
|
proposal = create(:proposal, author: author)
|
||||||
|
|
||||||
|
7.times { create(:vote, votable: proposal, vote_flag: true) }
|
||||||
|
|
||||||
|
login_as(author)
|
||||||
|
visit new_proposal_notification_path(proposal_id: proposal.id)
|
||||||
|
|
||||||
|
expect(page).to have_content "This message will be send to 7 people and it will be visible in the proposal's page"
|
||||||
|
expect(page).to have_link("the proposal's page", href: proposal_path(proposal))
|
||||||
|
end
|
||||||
|
|
||||||
context "Permissions" do
|
context "Permissions" do
|
||||||
|
|
||||||
scenario "Link to send the message" do
|
scenario "Link to send the message" do
|
||||||
|
|||||||
Reference in New Issue
Block a user