Adds spec to do not show questions section on budget poll

This commit is contained in:
decabeza
2018-06-13 20:28:00 +02:00
committed by Javi Martín
parent bee616c878
commit 7bd0f9c1d7

View File

@@ -40,4 +40,23 @@ feature "Admin Budgets" do
end
context "Show" do
scenario "Do not show questions section if the budget have a poll associated" do
budget = create(:budget)
poll = create(:poll, budget: budget)
visit admin_poll_path(poll)
within "#poll-resources" do
expect(page).not_to have_content("Questions")
expect(page).to have_content("Booths")
expect(page).to have_content("Officers")
expect(page).to have_content("Recounting")
expect(page).to have_content("Results")
end
end
end
end