Fix missing and extra spacing

This commit is contained in:
Bertocq
2017-12-16 17:51:58 +01:00
parent 3610c61d6f
commit c2b5083d4f
4 changed files with 22 additions and 22 deletions

View File

@@ -4,26 +4,26 @@ describe :booth_assignment do
let(:poll){create(:poll)}
let(:booth){create(:poll_booth)}
let(:booth1){create(:poll_booth)}
it "should check if there are shifts" do
assignment_with_shifts = create(:poll_booth_assignment, poll: poll, booth: booth)
assignment_without_shifts = create(:poll_booth_assignment, poll: poll, booth: booth1)
officer = create(:poll_officer)
create(:poll_officer_assignment, officer: officer, booth_assignment: assignment_with_shifts)
create(:poll_shift, booth: booth, officer: officer)
create(:poll_shift, booth: booth, officer: officer)
expect(assignment_with_shifts.shifts?).to eq(true)
expect(assignment_without_shifts.shifts?).to eq(false)
expect(assignment_without_shifts.shifts?).to eq(false)
end
it "should delete shifts associated to booth assignments" do
assignment = create(:poll_booth_assignment, poll: poll, booth: booth)
officer = create(:poll_officer)
create(:poll_officer_assignment, officer: officer, booth_assignment: assignment)
create(:poll_shift, booth: booth, officer: officer)
assignment.destroy
expect(Poll::Shift.all.count).to eq(0)
end
end