aboutsummaryrefslogtreecommitdiffstats
path: root/spec/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'spec/tasks')
-rw-r--r--spec/tasks/reflex_rake_spec.rb17
1 files changed, 7 insertions, 10 deletions
diff --git a/spec/tasks/reflex_rake_spec.rb b/spec/tasks/reflex_rake_spec.rb
index 2f5d0b709..f1dc25bc8 100644
--- a/spec/tasks/reflex_rake_spec.rb
+++ b/spec/tasks/reflex_rake_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe 'test' do
+describe 'reflex:sync' do
before(:all) do
['getOP', 'getOR'].each do |method|
stub_request(:get, "https://reflex.stif.info/ws/reflex/V1/service=getData/?format=xml&idRefa=0&method=#{method}").
@@ -8,14 +8,11 @@ describe 'test' do
end
end
- context 'process stop area sync' do
- it 'should return results on valid request' do
- start = Time.now
- # Must have a referential
- create(:stop_area_referential, name: 'Reflex')
-
- Stif::ReflexSynchronization.synchronize
- Rails.logger.debug "Reflex-api sync done in #{Time.now - start} seconds !"
- end
+ it 'should create stopArea on successfull request' do
+ # Must have an stop_area_referential
+ create(:stop_area_referential, name: 'Reflex')
+ Stif::ReflexSynchronization.synchronize
+ expect(Chouette::StopArea.count).to eq 7928
+ expect(Chouette::AccessPoint.count).to eq 60
end
end