aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorZog2018-04-30 11:02:24 +0200
committerZog2018-04-30 11:02:24 +0200
commit6779a070b8d5d6d738539f84e4405a86337f7dfb (patch)
tree55b826ecb627723b69086997b5191a23409eb1ab /spec
parent147bb21a2ca1ea9cd1f52f062c5eb3d1901da8cb (diff)
downloadchouette-core-6779a070b8d5d6d738539f84e4405a86337f7dfb.tar.bz2
Fix VehicleJourney#fill_passing_times!
Diffstat (limited to 'spec')
-rw-r--r--spec/models/chouette/vehicle_journey_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/chouette/vehicle_journey_spec.rb b/spec/models/chouette/vehicle_journey_spec.rb
index 01e350455..0fc75bec9 100644
--- a/spec/models/chouette/vehicle_journey_spec.rb
+++ b/spec/models/chouette/vehicle_journey_spec.rb
@@ -923,7 +923,7 @@ describe Chouette::VehicleJourney, :type => :model do
"2000-01-01 #{new_time.hour}:#{new_time.min}:#{new_time.sec} UTC".to_time
end
- describe "#fill_passing_time_at_borders" do
+ describe "#fill_passing_times!" do
before do
start = create :stop_area
border = create :stop_area, kind: :non_commercial, area_type: :border
@@ -962,7 +962,7 @@ describe Chouette::VehicleJourney, :type => :model do
end
it "should compute passing time" do
- @journey.reload.fill_passing_time_at_borders
+ @journey.reload.fill_passing_times!
expect(@target.reload.arrival_time.to_i).to eq offset_passing_time(@start.reload.departure_time, 1.0/3 * (@middle.reload.arrival_time - @start.departure_time)).to_i
expect(@target_2.reload.arrival_time).to eq @target.arrival_time
expect(@target.departure_time).to eq @target.arrival_time
@@ -979,7 +979,7 @@ describe Chouette::VehicleJourney, :type => :model do
end
it "should compute passing time" do
- @journey.reload.fill_passing_time_at_borders
+ @journey.reload.fill_passing_times!
expect(@target.reload.arrival_time.to_i).to eq offset_passing_time(@start.reload.departure_time, 1.0/3 * (@middle.reload.arrival_time - @start.departure_time)).to_i
expect(@target_2.reload.arrival_time).to eq @target.arrival_time
expect(@target.departure_time).to eq @target.arrival_time