Merge pull request #3041 from consul/budget-investment-show

[Backport] Budget investment show
This commit is contained in:
Alberto
2018-11-14 14:43:41 +01:00
committed by GitHub
2 changed files with 20 additions and 1 deletions

View File

@@ -156,7 +156,7 @@
<div class="callout success">
<%= t("budgets.investments.show.project_selected_html") %>
</div>
<% elsif !investment.selected? && @budget.balloting_or_later? %>
<% elsif @budget.balloting_or_later? %>
<div class="callout warning">
<%= t("budgets.investments.show.project_not_selected_html") %>
</div>

View File

@@ -1063,6 +1063,25 @@ feature 'Budget Investments' do
expect(page).to have_content("This investment project has not been selected for balloting phase")
end
scenario "Show title (no message)" do
user = create(:user)
login_as(user)
investment = create(:budget_investment,
:feasible,
:finished,
budget: budget,
group: group,
heading: heading)
visit budget_investment_path(budget_id: budget.id, id: investment.id)
within("aside") do
expect(page).to have_content("Investment project")
expect(page).to have_css(".label-budget-investment")
end
end
scenario "Show (unfeasible budget investment with valuation not finished)" do
user = create(:user)
login_as(user)