aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/models/chouette/route/route_stop_points_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/models/chouette/route/route_stop_points_spec.rb b/spec/models/chouette/route/route_stop_points_spec.rb
index 037c22f7e..f8edadfee 100644
--- a/spec/models/chouette/route/route_stop_points_spec.rb
+++ b/spec/models/chouette/route/route_stop_points_spec.rb
@@ -88,10 +88,12 @@ RSpec.describe Chouette::Route, :type => :model do
end
context 'defaults attributes' do
+ let(:new_stop_area) { create :stop_area, kind: 'non_commercial', area_type: 'deposit' }
+ let(:new_stop_point) { create :stop_point, stop_area_id: new_stop_area.id }
it 'should have the correct default attributes' do
- first_stop_point.stop_area.update_attributes(kind: 'non_commercial')
+ subject.stop_points << new_stop_point
subject.stop_points.each do |sp|
- sp.run_callbacks(:commit)
+ # binding.pry
if sp.stop_area.commercial?
expect(sp.for_boarding).to eq('normal')
expect(sp.for_alighting).to eq('normal')