Do not show confirm message if user can vote in all headings
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user