Check for link to poll in specs

This commit is contained in:
rgarcia
2018-06-11 19:19:06 +02:00
committed by Javi Martín
parent b1b88918f0
commit 8cfcfcb6a7

View File

@@ -9,12 +9,12 @@ feature "Admin Budgets" do
scenario "Admin ballots link appears if budget has a poll associated" do scenario "Admin ballots link appears if budget has a poll associated" do
budget = create(:budget) budget = create(:budget)
create(:poll, budget: budget) poll = create(:poll, budget: budget)
visit admin_budgets_path visit admin_budgets_path
within "#budget_#{budget.id}" do within "#budget_#{budget.id}" do
expect(page).to have_link("Admin ballots") expect(page).to have_link("Admin ballots", admin_poll_path(poll))
end end
end end