From be3c5cd964581edc0fef868cca6889cb4acc1e10 Mon Sep 17 00:00:00 2001 From: Alban Peignier Date: Wed, 25 Apr 2018 21:13:00 +0200 Subject: Update VehicleJourney checksum when StopPoint change isn't necessary in fact (#mybad). Refs #6711 --- spec/models/chouette/vehicle_journey_spec.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/spec/models/chouette/vehicle_journey_spec.rb b/spec/models/chouette/vehicle_journey_spec.rb index e0d4309d2..9cc695c3c 100644 --- a/spec/models/chouette/vehicle_journey_spec.rb +++ b/spec/models/chouette/vehicle_journey_spec.rb @@ -1,3 +1,4 @@ +# coding: utf-8 require 'spec_helper' describe Chouette::VehicleJourney, :type => :model do @@ -35,15 +36,6 @@ describe Chouette::VehicleJourney, :type => :model do expect{create(:vehicle_journey_at_stop, vehicle_journey: vehicle_journey)}.to change{vehicle_journey.checksum} end - it "changes when a stop_point is updated" do - vehicle_journey = create(:vehicle_journey) - stop_point = vehicle_journey.vehicle_journey_at_stops.first.stop_point - expect(stop_point.vehicle_journeys).to include vehicle_journey - expect do - stop_point.update position: stop_point.route.stop_points.size - end.to change{vehicle_journey.reload.checksum} - end - context "when custom_field_values change" do let(:vehicle_journey){ create(:vehicle_journey, custom_field_values: {custom_field.code.to_s => former_value}) } let(:custom_field){ create :custom_field, field_type: :string, code: :energy, name: :energy, resource_type: "VehicleJourney" } -- cgit v1.2.3