Extract component for balloting budget admin stats
We're also moving the tests, but we're keeping one system test in order to test the controller and the navigation to get to this page. Note we're slightly changing the order of the methods in the component; the order of the instance variables was `user_`, `vote_`, `vote_`, `user_`, which was hard to follow.
This commit is contained in:
@@ -195,19 +195,6 @@ describe "Stats", :admin do
|
||||
end
|
||||
|
||||
expect(page).to have_content "VOTES\n3"
|
||||
end
|
||||
|
||||
scenario "Number of users that have voted a investment project" do
|
||||
create(:user, ballot_lines: [investment])
|
||||
create(:user, ballot_lines: [investment])
|
||||
create(:user)
|
||||
|
||||
visit admin_stats_path
|
||||
click_link "Participatory Budgets"
|
||||
within("#budget_#{budget.id}") do
|
||||
click_link "Final voting"
|
||||
end
|
||||
|
||||
expect(page).to have_content "PARTICIPANTS\n2"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user