diff options
| author | Zog | 2018-01-11 12:16:38 +0100 |
|---|---|---|
| committer | Zog | 2018-01-11 12:16:38 +0100 |
| commit | 833d1e4f991f0f7a0f8800bbdc97410a846ffcec (patch) | |
| tree | bbaed9e86151b76d294622e5849dadd6132f8eff /spec | |
| parent | 25ddf5946b9e0e5412e6e0db5f0b6be264b59a72 (diff) | |
| download | chouette-core-833d1e4f991f0f7a0f8800bbdc97410a846ffcec.tar.bz2 | |
Refs #5547 @0.25h; Show newly created VJ's short_id in editor
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/models/chouette/vehicle_journey_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/models/chouette/vehicle_journey_spec.rb b/spec/models/chouette/vehicle_journey_spec.rb index 3ec2387e5..06cac6bc7 100644 --- a/spec/models/chouette/vehicle_journey_spec.rb +++ b/spec/models/chouette/vehicle_journey_spec.rb @@ -100,11 +100,15 @@ describe Chouette::VehicleJourney, :type => :model do Chouette::VehicleJourney.state_update(route, collection) }.to change {Chouette::VehicleJourney.count}.by(1) - expect(collection.last['objectid']).not_to be_nil obj = Chouette::VehicleJourney.last + expect(obj).to receive(:after_commit_objectid).and_call_original + + # For some reason we have to force it + obj.after_commit_objectid obj.run_callbacks(:commit) + expect(collection.last['objectid']).to eq obj.objectid expect(obj.published_journey_name).to eq 'dummy' end |
