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:
@@ -7,10 +7,10 @@ describe "Voters" do
|
||||
let(:officer) { create(:poll_officer) }
|
||||
|
||||
before do
|
||||
login_as(officer.user)
|
||||
create(:geozone, :in_census)
|
||||
create(:poll_shift, officer: officer, booth: booth, date: Date.current, task: :vote_collection)
|
||||
create(:poll_officer_assignment, officer: officer, poll: poll, booth: booth)
|
||||
login_as(officer.user)
|
||||
set_officing_booth(booth)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user