Save Cadastre
This commit is contained in:
parent
b5f2163c51
commit
6a3525c7e2
8 changed files with 129 additions and 18 deletions
|
@ -18,6 +18,22 @@ describe CARTO::SGMAP::Cadastre::Adapter do
|
|||
it { expect(subject).to be_a_instance_of(Array) }
|
||||
it { expect(subject.size).to eq 16 }
|
||||
|
||||
describe 'Attribut filter' do
|
||||
let(:adapter) { described_class.new(coordinates) }
|
||||
subject { adapter.filter_properties adapter.data_source }
|
||||
|
||||
it { expect(subject.size).to eq 9 }
|
||||
it { expect(subject.keys).to eq [:surface_intersection,
|
||||
:surface_parcelle,
|
||||
:numero,
|
||||
:feuille,
|
||||
:section,
|
||||
:code_dep,
|
||||
:nom_com,
|
||||
:code_com,
|
||||
:code_arr] }
|
||||
end
|
||||
|
||||
describe 'Attributes' do
|
||||
subject { super().first }
|
||||
|
||||
|
@ -31,7 +47,7 @@ describe CARTO::SGMAP::Cadastre::Adapter do
|
|||
it { expect(subject[:code_com]).to eq('046') }
|
||||
it { expect(subject[:code_arr]).to eq('000') }
|
||||
|
||||
it { expect(subject[:geometry]).to eq({type: "MultiPolygon", coordinates: [[[[2.4362443, 48.8092078], [2.436384, 48.8092043], [2.4363802, 48.8091414]]]] })}
|
||||
it { expect(subject[:geometry]).to eq({type: "MultiPolygon", coordinates: [[[[2.4362443, 48.8092078], [2.436384, 48.8092043], [2.4363802, 48.8091414]]]]}) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue