Add QuartierPrioritaire test

This commit is contained in:
Xavier J 2016-12-16 10:15:29 +01:00
parent 21dc35215e
commit 0aedeba125
2 changed files with 11 additions and 0 deletions

View file

@ -7,4 +7,14 @@ describe QuartierPrioritaire do
it { is_expected.to have_db_column(:geometry) } it { is_expected.to have_db_column(:geometry) }
it { is_expected.to belong_to(:dossier) } it { is_expected.to belong_to(:dossier) }
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
end end

File diff suppressed because one or more lines are too long