Merge pull request #1867 from consul/chore/rubocop_autocorrections
🤖 Rubocop autocorrections
This commit is contained in:
@@ -25,20 +25,20 @@ describe :booth do
|
||||
end
|
||||
|
||||
describe "#available" do
|
||||
|
||||
|
||||
it "returns booths associated to current or incoming polls" do
|
||||
booth_for_current_poll = create(:poll_booth)
|
||||
booth_for_incoming_poll = create(:poll_booth)
|
||||
booth_for_expired_poll = create(:poll_booth)
|
||||
|
||||
|
||||
current_poll = create(:poll, :current)
|
||||
incoming_poll = create(:poll, :incoming)
|
||||
expired_poll = create(:poll, :expired)
|
||||
|
||||
|
||||
create(:poll_booth_assignment, poll: current_poll, booth: booth_for_current_poll)
|
||||
create(:poll_booth_assignment, poll: incoming_poll, booth: booth_for_incoming_poll)
|
||||
create(:poll_booth_assignment, poll: expired_poll, booth: booth_for_expired_poll)
|
||||
|
||||
|
||||
expect(Poll::Booth.available).to include(booth_for_current_poll)
|
||||
expect(Poll::Booth.available).to include(booth_for_incoming_poll)
|
||||
expect(Poll::Booth.available).to_not include(booth_for_expired_poll)
|
||||
|
||||
@@ -43,7 +43,7 @@ describe :shift do
|
||||
|
||||
officer_assignments = Poll::OfficerAssignment.all
|
||||
expect(officer_assignments.count).to eq(2)
|
||||
|
||||
|
||||
oa1 = officer_assignments.first
|
||||
oa2 = officer_assignments.second
|
||||
|
||||
@@ -59,10 +59,10 @@ describe :shift do
|
||||
end
|
||||
|
||||
describe "#persist_data" do
|
||||
|
||||
let(:user) { create(:user, username: "Ana", email: "ana@example.com") }
|
||||
let(:officer) { create(:poll_officer, user: user) }
|
||||
let(:shift) { create(:poll_shift, officer: officer) }
|
||||
|
||||
let(:user) { create(:user, username: "Ana", email: "ana@example.com") }
|
||||
let(:officer) { create(:poll_officer, user: user) }
|
||||
let(:shift) { create(:poll_shift, officer: officer) }
|
||||
|
||||
it "should maintain officer data after destroying associated user" do
|
||||
shift.officer.user.destroy
|
||||
@@ -79,5 +79,5 @@ describe :shift do
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user