fix an intermittent calendar events api spec failure

fixes #CNVS-3326 - the order of the events was not well defined
since they had the same start and end dates.

Change-Id: If3398c4acda49d03440b31b7f55c285f84c58949
Reviewed-on: https://gerrit.instructure.com/17112
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
This commit is contained in:
Jon Willesen 2013-01-24 13:45:51 -07:00 committed by Bryan Madsen
parent 54c502c9f8
commit 4375e7395a
1 changed files with 8 additions and 2 deletions

View File

@ -355,9 +355,15 @@ describe CalendarEventsApiController, :type => :integration do
e['child_events_count'].should eql 2
e['child_events'].size.should eql 1 # can't see otherguy's stuff
e['available_slots'].should eql 2
case e['id']
when event1.id
e['child_events'].first.keys.sort.should eql((expected_reservation_fields + ['own_reservation', 'user']).sort)
when event2.id
e['child_events'].first.keys.sort.should eql((expected_reservation_fields + ['own_reservation', 'group'] - ['effective_context_code']).sort)
else
fail "unexpected event id"
end
end
json.first['child_events'].first.keys.sort.should eql((expected_reservation_fields + ['own_reservation', 'user']).sort)
json.last['child_events'].first.keys.sort.should eql((expected_reservation_fields + ['own_reservation', 'group'] - ['effective_context_code']).sort)
end
context "reservations" do