test/calendars/calendar_test.rb in simple_calendar-3.0.1 vs test/calendars/calendar_test.rb in simple_calendar-3.0.2

- old
+ new

@@ -124,9 +124,16 @@ calendar_date_range.each do |date| assert_kind_of Date, date end end + test "handles nil events" do + assert_nothing_raised do + calendar = SimpleCalendar::Calendar.new(view, events: nil) + calendar.sorted_events.first + end + end + test "accepts an array of events" do first_event = Meeting.new(name: "event1", start_time: Date.today) second_event = Meeting.new(name: "event2", start_time: Date.today + 1.day) events = [first_event, second_event] calendar = SimpleCalendar::Calendar.new(view, events: events)