Do not show confirm message if user can vote in all headings

This commit is contained in:
decabeza
2021-07-14 16:14:29 +02:00
parent 3f9614fbe1
commit e42db48f2b
2 changed files with 11 additions and 1 deletions

View File

@@ -198,6 +198,16 @@ describe "Votes" do
expect(page.driver.send(:find_modal).text).to match "You can only support investments in 2 districts."
end
scenario "Do not show confirm message if user can vote in all headings" do
group.update!(max_votable_headings: group.headings.count)
visit budget_investments_path(budget, heading_id: new_york.id)
click_button "Support"
expect(page).to have_content "1 support"
expect(page).to have_content "You have already supported this investment project. Share it!"
end
end
end