diff options
| author | jpl | 2017-03-10 12:10:28 +0100 |
|---|---|---|
| committer | jpl | 2017-03-10 12:10:46 +0100 |
| commit | 9cbfcb28636ef7cb22c3a3c47208e9bc0a14ad1c (patch) | |
| tree | 2ebb23ab005c696b96b8b63550c15d629630b775 /spec | |
| parent | 8ddfc8c0441eaa29fee3974d9d74d078ddc83502 (diff) | |
| download | chouette-core-9cbfcb28636ef7cb22c3a3c47208e9bc0a14ad1c.tar.bz2 | |
Fix t2e layout, fix tests with random array compare
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/models/chouette/route_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/chouette/route_spec.rb b/spec/models/chouette/route_spec.rb index e24e16b18..378e359e0 100644 --- a/spec/models/chouette/route_spec.rb +++ b/spec/models/chouette/route_spec.rb @@ -125,15 +125,15 @@ describe Chouette::Route, :type => :model do it "should ignore deleted stop_point from route" do subject.update_attributes( :stop_points_attributes => removed_stop_hash) - expect(Chouette::Route.find( subject.id ).stop_points.map(&:id)).to eq(new_stop_id_list) + expect(Chouette::Route.find( subject.id ).stop_points.map(&:id).sort).to eq(new_stop_id_list.sort) end it "should ignore deleted stop_point from route's journey pattern" do subject.update_attributes( :stop_points_attributes => removed_stop_hash) - expect(Chouette::JourneyPattern.find( journey_pattern.id ).stop_points.map(&:id)).to eq(new_stop_id_list) + expect(Chouette::JourneyPattern.find( journey_pattern.id ).stop_points.map(&:id).sort).to eq(new_stop_id_list.sort) end it "should ignore deleted stop_point from route's vehicle journey at stop" do subject.update_attributes( :stop_points_attributes => removed_stop_hash) - expect(Chouette::VehicleJourney.find( vehicle_journey.id ).vehicle_journey_at_stops.map(&:stop_point_id)).to match_array(new_stop_id_list) + expect(Chouette::VehicleJourney.find( vehicle_journey.id ).vehicle_journey_at_stops.map(&:stop_point_id).sort).to match_array(new_stop_id_list.sort) end end end |
