Move login_as after creating data for a test
It doesn't really affect the tests, but it helps isolate useless assignments, and we already did it this way 94% of the time.
This commit is contained in:
@@ -19,11 +19,10 @@ describe "Polls" do
|
||||
context "Admin index" do
|
||||
|
||||
scenario "Budget polls should not appear in the list" do
|
||||
login_as(create(:administrator).user)
|
||||
|
||||
poll = create(:poll)
|
||||
budget_poll = create(:poll, :for_budget)
|
||||
|
||||
login_as(create(:administrator).user)
|
||||
visit admin_polls_path
|
||||
|
||||
expect(page).to have_content(poll.name)
|
||||
|
||||
Reference in New Issue
Block a user