diff options
| author | Alban Peignier | 2018-04-25 21:13:00 +0200 |
|---|---|---|
| committer | Alban Peignier | 2018-04-25 21:13:00 +0200 |
| commit | be3c5cd964581edc0fef868cca6889cb4acc1e10 (patch) | |
| tree | 75b2b97848ed8af3158ab278cd36a2e60d731d2a | |
| parent | 01b34863fce398ffa7bbc2841f8acca78f217e06 (diff) | |
| download | chouette-core-be3c5cd964581edc0fef868cca6889cb4acc1e10.tar.bz2 | |
Update VehicleJourney checksum when StopPoint change isn't necessary in fact (#mybad). Refs #67116711-update-parents-checksum
| -rw-r--r-- | spec/models/chouette/vehicle_journey_spec.rb | 10 |
1 files changed, 1 insertions, 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" } |
