Unify #generate_qp with #generate_cadastre
This commit is contained in:
parent
a18af4e616
commit
22beb41240
4 changed files with 12 additions and 21 deletions
|
@ -15,18 +15,16 @@ describe CARTO::SGMAP::QuartiersPrioritaires::Adapter do
|
|||
let(:status) { 200 }
|
||||
let(:body) { File.read('spec/support/files/geojson/response_qp.json') }
|
||||
|
||||
it { expect(subject).to be_a_instance_of(Hash) }
|
||||
it { expect(subject).to be_a_instance_of(Array) }
|
||||
|
||||
context 'Attributes' do
|
||||
let(:qp_code) { 'QP057019' }
|
||||
|
||||
subject { super()[qp_code] }
|
||||
it { expect(subject.first[:code]).to eq(qp_code) }
|
||||
it { expect(subject.first[:nom]).to eq('Hauts De Vallières') }
|
||||
it { expect(subject.first[:commune]).to eq('Metz') }
|
||||
|
||||
it { expect(subject[:code]).to eq(qp_code) }
|
||||
it { expect(subject[:nom]).to eq('Hauts De Vallières') }
|
||||
it { expect(subject[:commune]).to eq('Metz') }
|
||||
|
||||
it { expect(subject[:geometry]).to eq({ :type => "MultiPolygon", :coordinates => [[[[6.2136923480551, 49.1342109827851], [6.21416055031881, 49.1338823553928]]]] }) }
|
||||
it { expect(subject.first[:geometry]).to eq({ :type => "MultiPolygon", :coordinates => [[[[6.2136923480551, 49.1342109827851], [6.21416055031881, 49.1338823553928]]]] }) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue