aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorZog2018-02-26 10:25:49 +0100
committerZog2018-02-26 10:25:49 +0100
commitb9c3c0a47db7d733a80001f2b80ddcb7d69ec852 (patch)
tree78e1073552692e1d529518c7a536c1101865df22 /spec
parent3b84483f292c5b880bb2f72bd185f505dabbc478 (diff)
downloadchouette-core-b9c3c0a47db7d733a80001f2b80ddcb7d69ec852.tar.bz2
Fix specs
Diffstat (limited to 'spec')
-rw-r--r--spec/models/chouette/vehicle_journey_spec.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/models/chouette/vehicle_journey_spec.rb b/spec/models/chouette/vehicle_journey_spec.rb
index 76e73d9cf..c69655bd4 100644
--- a/spec/models/chouette/vehicle_journey_spec.rb
+++ b/spec/models/chouette/vehicle_journey_spec.rb
@@ -260,7 +260,7 @@ describe Chouette::VehicleJourney, :type => :model do
item['purchase_windows'] = []
item['footnotes'] = []
item['purchase_windows'] = []
- item['custom_fields'] = vj.custom_fields
+ item['custom_fields'] = vj.custom_fields.to_hash
vj.vehicle_journey_at_stops.each do |vjas|
item['vehicle_journey_at_stops'] << vehicle_journey_at_stop_to_state(vjas)
@@ -282,7 +282,6 @@ describe Chouette::VehicleJourney, :type => :model do
Chouette::VehicleJourney.state_update(route, collection)
}.to change {Chouette::VehicleJourney.count}.by(1)
-
obj = Chouette::VehicleJourney.last
expect(obj).to receive(:after_commit_objectid).and_call_original
@@ -292,7 +291,7 @@ describe Chouette::VehicleJourney, :type => :model do
expect(collection.last['objectid']).to eq obj.objectid
expect(obj.published_journey_name).to eq 'dummy'
- expect(obj.custom_fields["energy"]["value"]).to eq 99
+ expect(obj.custom_fields["energy"].value).to eq 99
end
it 'should expect local times' do