Hides budget polls in polls admin index
This commit is contained in:
19
spec/features/budget_polls/polls_spec.rb
Normal file
19
spec/features/budget_polls/polls_spec.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
require "rails_helper"
|
||||
|
||||
feature "Polls" do
|
||||
|
||||
context "Admin index" do
|
||||
it "Budget polls should not appear in the list" do
|
||||
login_as(create(:administrator).user)
|
||||
|
||||
poll = create(:poll)
|
||||
budget_poll = create(:poll, budget: create(:budget))
|
||||
|
||||
visit admin_polls_path
|
||||
|
||||
expect(page).to have_content(poll.name)
|
||||
expect(page).not_to have_content(budget_poll.name)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user