Do not show money with hidden money

This commit is contained in:
decabeza
2022-08-09 20:30:25 +02:00
committed by taitus
parent 4debff754c
commit 9ef90b1e49
4 changed files with 79 additions and 10 deletions

View File

@@ -1498,6 +1498,29 @@ describe "Budget Investments" do
end
end
describe "total amount" do
before do
budget.update!(voting_style: "approval")
heading.update!(price: 2000)
end
scenario "Do not show total budget amount for budget with hidden money" do
budget.update!(hide_money: true)
visit budget_investments_path(budget, heading_id: heading)
expect(page).not_to have_content "Total budget"
expect(page).not_to have_content "€2,000"
end
scenario "Show total budget amount for budget without hidden money" do
visit budget_investments_path(budget, heading_id: heading)
expect(page).to have_content "Total budget"
expect(page).to have_content "€2,000"
end
end
scenario "Highlight voted heading" do
budget.update!(phase: "balloting")
user = create(:user, :level_two)