diff options
| author | Alban Peignier | 2018-04-26 00:44:42 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2018-04-26 00:45:13 +0200 | 
| commit | 499a4785f3c6108202bbc19926a46ff548637bb1 (patch) | |
| tree | c57d9356474e775f906196e448edcd0c758cab2f /spec/models | |
| parent | 05fd553395ac66359b1be7428c9b28ced432bd0a (diff) | |
| download | chouette-core-499a4785f3c6108202bbc19926a46ff548637bb1.tar.bz2 | |
Avoid problem in merge specs with route checksum (problem not reproduced in real condition)
Diffstat (limited to 'spec/models')
| -rw-r--r-- | spec/models/merge_spec.rb | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/spec/models/merge_spec.rb b/spec/models/merge_spec.rb index 685e675cd..242fcddcd 100644 --- a/spec/models/merge_spec.rb +++ b/spec/models/merge_spec.rb @@ -40,12 +40,15 @@ RSpec.describe Merge do          checksum = route.checksum          routing_constraint_zones[route.id] = {}          2.times do |i| -          constraint_zone = create(:routing_constraint_zone, route: route) +          constraint_zone = create(:routing_constraint_zone, route_id: route.id)            if i > 0              constraint_zone.update stop_points: constraint_zone.stop_points[0...-1]            end            routing_constraint_zones[route.id][constraint_zone.checksum] = constraint_zone          end + +        route.reload.update_checksum! +          expect(route.reload.checksum).to_not eq checksum          factor.times do            FactoryGirl.create :journey_pattern, route: route, stop_points: route.stop_points.sample(3) | 
