feat(types de champ): add EPCI champ
This commit is contained in:
parent
f38ee8f03f
commit
a4cbbe721e
24 changed files with 337 additions and 11 deletions
|
@ -42,4 +42,11 @@ describe APIGeoService do
|
|||
expect(APIGeoService.departements.last).to eq(code: '976', name: 'Mayotte')
|
||||
end
|
||||
end
|
||||
|
||||
describe 'epcis', vcr: { cassette_name: 'api_geo_epcis' } do
|
||||
it 'return sorted results' do
|
||||
expect(APIGeoService.epcis('01').size).to eq(17)
|
||||
expect(APIGeoService.epcis('01').first).to eq(code: '200042935', name: 'CA Haut - Bugey Agglomération')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
require 'csv'
|
||||
|
||||
describe ProcedureExportService do
|
||||
describe ProcedureExportService, vcr: { cassette_name: 'api_geo_all' } do
|
||||
let(:procedure) { create(:procedure, :published, :for_individual, :with_all_champs) }
|
||||
let(:service) { ProcedureExportService.new(procedure, procedure.dossiers) }
|
||||
|
||||
let(:memory_store) { ActiveSupport::Cache.lookup_store(:memory_store) }
|
||||
|
||||
before do
|
||||
allow(APIGeoService).to receive(:departement_name).with('01').and_return('Ain')
|
||||
allow(Rails).to receive(:cache).and_return(memory_store)
|
||||
Rails.cache.clear
|
||||
end
|
||||
|
||||
describe 'to_xlsx' do
|
||||
|
@ -88,7 +92,10 @@ describe ProcedureExportService do
|
|||
"dgfip",
|
||||
"pole_emploi",
|
||||
"mesri",
|
||||
"text"
|
||||
"text",
|
||||
"epci",
|
||||
"epci (Code)",
|
||||
"epci (Département)"
|
||||
]
|
||||
end
|
||||
|
||||
|
@ -195,7 +202,10 @@ describe ProcedureExportService do
|
|||
"dgfip",
|
||||
"pole_emploi",
|
||||
"mesri",
|
||||
"text"
|
||||
"text",
|
||||
"epci",
|
||||
"epci (Code)",
|
||||
"epci (Département)"
|
||||
]
|
||||
end
|
||||
|
||||
|
@ -285,7 +295,10 @@ describe ProcedureExportService do
|
|||
"dgfip",
|
||||
"pole_emploi",
|
||||
"mesri",
|
||||
"text"
|
||||
"text",
|
||||
"epci",
|
||||
"epci (Code)",
|
||||
"epci (Département)"
|
||||
]
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue