aboutsummaryrefslogtreecommitdiffstats
path: root/spec/tasks/reflex_rake_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/tasks/reflex_rake_spec.rb')
-rw-r--r--spec/tasks/reflex_rake_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/tasks/reflex_rake_spec.rb b/spec/tasks/reflex_rake_spec.rb
index bf1a81a82..3a0ce0632 100644
--- a/spec/tasks/reflex_rake_spec.rb
+++ b/spec/tasks/reflex_rake_spec.rb
@@ -7,7 +7,9 @@ describe 'reflex:sync' do
stub_request(:get, "https://reflex.stif.info/ws/reflex/V1/service=getData/?format=xml&idRefa=0&method=#{method}").
to_return(body: File.open("#{fixture_path}/reflex.zip"), status: 200)
end
- create(:stop_area_referential, name: 'Reflex')
+
+ stop_area_ref = create(:stop_area_referential, name: 'Reflex')
+ create(:stop_area_referential_sync, stop_area_referential: stop_area_ref)
Stif::ReflexSynchronization.synchronize
end
@@ -42,6 +44,11 @@ describe 'reflex:sync' do
Stif::ReflexSynchronization.synchronize
end
+ it 'should log sync operations' do
+ expect(StopAreaSyncOperation.count).to eq 2
+ expect(StopAreaSyncOperation.take.status).to eq "ok"
+ end
+
it 'should not create duplicate stop_area' do
expect(Chouette::StopArea.count).to eq 6
expect(Chouette::AccessPoint.count).to eq 2