aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorXinhui2016-11-29 15:09:54 +0100
committerXinhui2016-11-29 15:52:39 +0100
commitbea0f42a318c17878fa99a0adaf3d3e2d2811a06 (patch)
tree51d332b4630e5b1ad9afcdbdc6f1e20bd533275b /spec
parentac92d7020fe98f43381fc896a5c499e0029c7ac8 (diff)
downloadchouette-core-bea0f42a318c17878fa99a0adaf3d3e2d2811a06.tar.bz2
Refactoring stop_area area_type as enumerize
Diffstat (limited to 'spec')
-rw-r--r--spec/factories/chouette_stop_areas.rb2
-rw-r--r--spec/tasks/reflex_rake_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/factories/chouette_stop_areas.rb b/spec/factories/chouette_stop_areas.rb
index 5ac22adda..8e92b024b 100644
--- a/spec/factories/chouette_stop_areas.rb
+++ b/spec/factories/chouette_stop_areas.rb
@@ -3,7 +3,7 @@ FactoryGirl.define do
sequence(:objectid) { |n| "test:StopArea:#{n}" }
sequence(:name) { |n| "stop_area_#{n}" }
sequence(:registration_number) { |n| "test-#{n}" }
- area_type "CommercialStopPoint"
+ area_type { Chouette::StopArea.area_type.values.sample }
latitude {10.0 * rand}
longitude {10.0 * rand}
diff --git a/spec/tasks/reflex_rake_spec.rb b/spec/tasks/reflex_rake_spec.rb
index 7a27b49fc..ab1aefc7d 100644
--- a/spec/tasks/reflex_rake_spec.rb
+++ b/spec/tasks/reflex_rake_spec.rb
@@ -31,7 +31,7 @@ describe 'reflex:sync' do
it 'should map xml data to StopArea attribute' do
stop_area = Chouette::StopArea.find_by(objectid: 'FR:77153:LDA:69325:STIF')
expect(stop_area.zip_code).to eq '77153'
- expect(stop_area.area_type).to eq 'StopPlace'
+ expect(stop_area.area_type).to eq 'lda'
end
context 'On next sync' do