Skip to content

Commit

Permalink
fixup! Refactor PlannedTimetableSlot and add some extra specs
Browse files Browse the repository at this point in the history
  • Loading branch information
jirutka committed Oct 15, 2015
1 parent 17cb50c commit 89cd570
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions spec/roles/planned_timetable_slot_spec.rb
Expand Up @@ -31,13 +31,15 @@

describe '#clear_extra_events' do

let!(:extra_event) { Fabricate(:event,
absolute_sequence_number: 20,
timetable_slot_id: slot.id,
parallel_id: slot.parallel.id,
applied_schedule_exception_ids: [Fabricate(:schedule_exception).id])
}
let!(:planned_event) { Fabricate(:event, timetable_slot_id: slot.id, parallel_id: slot.parallel.id) }
let!(:extra_event) do
Fabricate(:event, absolute_sequence_number: 20, timetable_slot_id: slot.id,
applied_schedule_exception_ids: [Fabricate(:schedule_exception).id],
parallel_id: slot.parallel.id)
end

let!(:planned_event) do
Fabricate(:event, timetable_slot_id: slot.id, parallel_id: slot.parallel.id)
end

it 'marks extra events as deleted' do
expect {
Expand Down

0 comments on commit 89cd570

Please sign in to comment.