diff options
| author | Xinhui | 2016-09-09 12:48:27 +0200 |
|---|---|---|
| committer | Xinhui | 2016-09-09 12:48:49 +0200 |
| commit | c78802969f4d45028d3854198e311530813ae73b (patch) | |
| tree | 720f119123b051fc609a534c54482c924c65760e /spec/tasks | |
| parent | a40c2468c762f039061e71f2e2ba03358e5183ec (diff) | |
| download | chouette-core-c78802969f4d45028d3854198e311530813ae73b.tar.bz2 | |
Model StopAreaReferentialSync
Refs #1609
Diffstat (limited to 'spec/tasks')
| -rw-r--r-- | spec/tasks/reflex_rake_spec.rb | 9 |
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 |
