spec/lib/schedule_spec.rb in icalendar-recurrence-1.1.3 vs spec/lib/schedule_spec.rb in icalendar-recurrence-1.2.0
- old
+ new
@@ -19,9 +19,15 @@
expect(schedule.start_time).to eq(Time.parse("2014-01-13T08:00:00-08:00"))
expect(occurrences.count).to eq(7)
end
+ it 'returns object whose event method matches the origin event' do
+ # Simple test to make sure the event carried over; different __id__
+ expect(example_occurrence.parent.custom_properties).to eq example_event(:daily).custom_properties
+ expect(example_occurrence.parent.name).to eq example_event(:daily).name
+ end
+
context "timezoned event" do
let(:example_occurrence) do
timezoned_event = example_event :first_saturday_of_month
schedule = Schedule.new(timezoned_event)
example_occurrence = schedule.occurrences_between(Date.parse("2014-02-01"), Date.parse("2014-03-01")).first