Adds message in budget investment show if project is winner

This commit is contained in:
decabeza
2018-07-13 12:52:57 +02:00
parent a10cade451
commit bbaec57c8a
4 changed files with 47 additions and 0 deletions

View File

@@ -956,6 +956,41 @@ feature 'Budget Investments' do
expect(page).to have_content("This investment project has been marked as not feasible and will not go to balloting phase")
end
scenario "Show (selected budget investment)" do
user = create(:user)
login_as(user)
investment = create(:budget_investment,
:feasible,
:finished,
:selected,
budget: budget,
group: group,
heading: heading)
visit budget_investment_path(budget_id: budget.id, id: investment.id)
expect(page).to have_content("This investment project has been selected for balloting phase")
end
scenario "Show (winner budget investment)" do
user = create(:user)
login_as(user)
investment = create(:budget_investment,
:feasible,
:finished,
:selected,
:winner,
budget: budget,
group: group,
heading: heading)
visit budget_investment_path(budget_id: budget.id, id: investment.id)
expect(page).to have_content("Winning investment project")
end
scenario "Show (not selected budget investment)" do
user = create(:user)
login_as(user)