Merge pull request #3603 from consul/admin_stats_before_voting_phase
Avoid error when accessing final voting stats before the balloting phase
This commit is contained in:
@@ -189,6 +189,21 @@ describe "Stats" do
|
||||
expect(page).to have_content 0
|
||||
end
|
||||
end
|
||||
|
||||
scenario "hide final voting link" do
|
||||
visit admin_stats_path
|
||||
click_link "Participatory Budgets"
|
||||
|
||||
within("#budget_#{@budget.id}") do
|
||||
expect(page).not_to have_link "Final voting"
|
||||
end
|
||||
end
|
||||
|
||||
scenario "show message when accessing final voting stats" do
|
||||
visit budget_balloting_admin_stats_path(budget_id: @budget.id)
|
||||
|
||||
expect(page).to have_content "There isn't any data to show before the balloting phase."
|
||||
end
|
||||
end
|
||||
|
||||
context "Balloting phase" do
|
||||
|
||||
Reference in New Issue
Block a user