aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile.lock2
-rw-r--r--config/environments/test.rb3
-rw-r--r--lib/stif/reflex_synchronization.rb2
-rw-r--r--spec/tasks/reflex_rake_spec.rb4
4 files changed, 7 insertions, 4 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index a0d8ca243..39770f32b 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -14,7 +14,7 @@ GIT
GIT
remote: git@github.com:AF83/stif-reflex-api.git
- revision: f91087c65d2e2b0a80e30acb6f7a0e863a10f8b4
+ revision: 1099522ceff571136e64ec2a625570861a3c8b6f
specs:
reflex (0.0.1)
nokogiri (~> 1.6)
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 512afab4f..b77a26273 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -60,6 +60,9 @@ Rails.application.configure do
url: "http://localhost:3000"
}
+ # Reflex api url
+ config.reflex_api_url = "https://195.46.215.128/ws/reflex/V1/service=getData"
+
# file to data for demo
config.demo_data = "tmp/demo.zip"
diff --git a/lib/stif/reflex_synchronization.rb b/lib/stif/reflex_synchronization.rb
index b68fd6fc5..19f39e858 100644
--- a/lib/stif/reflex_synchronization.rb
+++ b/lib/stif/reflex_synchronization.rb
@@ -85,7 +85,7 @@ module Stif
access.stop_area = stop_area
{
:name => :name,
- :access_type => :area_type,
+ :access_type => :access_type,
:object_version => :version,
:zip_code => :postal_code,
:city_name => :city,
diff --git a/spec/tasks/reflex_rake_spec.rb b/spec/tasks/reflex_rake_spec.rb
index ff9a555ef..e5320b429 100644
--- a/spec/tasks/reflex_rake_spec.rb
+++ b/spec/tasks/reflex_rake_spec.rb
@@ -4,7 +4,7 @@ describe 'reflex:sync' do
context 'On first sync' do
before(:each) do
['getOP', 'getOR'].each do |method|
- stub_request(:get, "https://reflex.stif.info/ws/reflex/V1/service=getData/?format=xml&idRefa=0&method=#{method}").
+ stub_request(:get, "#{Rails.application.config.reflex_api_url}/?format=xml&idRefa=0&method=#{method}").
to_return(body: File.open("#{fixture_path}/reflex.zip"), status: 200)
end
@@ -38,7 +38,7 @@ describe 'reflex:sync' do
context 'On next sync' do
before(:each) do
['getOP', 'getOR'].each do |method|
- stub_request(:get, "https://reflex.stif.info/ws/reflex/V1/service=getData/?format=xml&idRefa=0&method=#{method}").
+ stub_request(:get, "#{Rails.application.config.reflex_api_url}/?format=xml&idRefa=0&method=#{method}").
to_return(body: File.open("#{fixture_path}/reflex_updated.zip"), status: 200)
end
Stif::ReflexSynchronization.synchronize