diff options
| author | Luc Donnet | 2018-01-11 17:06:53 +0100 | 
|---|---|---|
| committer | GitHub | 2018-01-11 17:06:53 +0100 | 
| commit | 19e1f5fb193b7206424ebe32535468408a4b7ddf (patch) | |
| tree | 248bee22fbffeae966f830170bb573c4e854aad2 /spec/models/chouette | |
| parent | 6be4f648ed5f200af7dbe8843d24361c8c9f2b63 (diff) | |
| parent | e52651964779f1019819a1ef7134a8623099ea0e (diff) | |
| download | chouette-core-19e1f5fb193b7206424ebe32535468408a4b7ddf.tar.bz2 | |
Merge pull request #226 from af83/5547-show-vj-id
5547 Show newly created VJ's short_id in editor
Diffstat (limited to 'spec/models/chouette')
| -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  | 
