2015-11-24 10:02:55 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe QuartierPrioritaire do
|
|
|
|
it { is_expected.to have_db_column(:code) }
|
|
|
|
it { is_expected.to have_db_column(:nom) }
|
|
|
|
it { is_expected.to have_db_column(:commune) }
|
|
|
|
it { is_expected.to have_db_column(:geometry) }
|
|
|
|
|
|
|
|
it { is_expected.to belong_to(:dossier) }
|
2016-12-16 10:15:29 +01:00
|
|
|
|
|
|
|
describe 'geometry' do
|
|
|
|
|
|
|
|
let(:qp) { create :quartier_prioritaire, geometry: qp_geometry }
|
|
|
|
let(:qp_geometry) { File.open('spec/support/files/qp_geometry_value.txt').read }
|
|
|
|
|
|
|
|
subject { qp.geometry }
|
|
|
|
|
|
|
|
it { is_expected.to eq JSON.parse(qp_geometry) }
|
|
|
|
end
|
2015-11-24 10:02:55 +01:00
|
|
|
end
|