Merge pull request #2614 from microweb10/issue-2604

Fixes Issue #2604
This commit is contained in:
Alberto
2018-05-09 11:26:16 +02:00
committed by GitHub
4 changed files with 31 additions and 0 deletions

View File

@@ -137,6 +137,15 @@
<span class="icon-budget"></span>
</div>
<br>
<% if investment.unfeasible? %>
<div class="callout warning">
<%= t("budgets.investments.show.project_unfeasible_html") %>
</div>
<% elsif !investment.selected? %>
<div class="callout warning">
<%= t("budgets.investments.show.project_not_selected_html") %>
</div>
<% end %>
<% end %>
<% if investment.should_show_price? %>
<div class="sidebar-divider"></div>

View File

@@ -125,6 +125,8 @@ en:
no_milestones: Don't have defined milestones
milestone_publication_date: "Published %{publication_date}"
author: Author
project_unfeasible_html: 'This investment project <strong>has been marked as not feasible</strong> and will not go to balloting phase.'
project_not_selected_html: 'This investment project <strong>has not been selected</strong> for balloting phase.'
wrong_price_format: Only integer numbers
investment:
add: Vote

View File

@@ -125,6 +125,8 @@ es:
no_milestones: No hay hitos definidos
milestone_publication_date: "Publicado el %{publication_date}"
author: Autor
project_unfeasible_html: 'Este proyecto de inversión <strong>ha sido marcado como inviable</strong> y no pasará a la fase de votación.'
project_not_selected_html: 'Este proyecto de inversión <strong>no ha sido seleccionado</strong> para la fase de votación.'
wrong_price_format: Solo puede incluir caracteres numéricos
investment:
add: Votar

View File

@@ -953,6 +953,24 @@ feature 'Budget Investments' do
expect(page).to have_content("Unfeasibility explanation")
expect(page).to have_content("Local government is not competent in this matter")
expect(page).to have_content("This investment project has been marked as not feasible and will not go to balloting phase")
end
scenario "Show (not selected budget investment)" do
user = create(:user)
login_as(user)
investment = create(:budget_investment,
:feasible,
:finished,
budget: budget,
group: group,
heading: heading,
unfeasibility_explanation: 'Local government is not competent in this matter')
visit budget_investment_path(budget_id: budget.id, id: investment.id)
expect(page).to have_content("This investment project has not been selected for balloting phase")
end
scenario "Show (unfeasible budget investment with valuation not finished)" do