Add QuartierPrioritaire test
This commit is contained in:
parent
21dc35215e
commit
0aedeba125
2 changed files with 11 additions and 0 deletions
|
@ -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
|
||||||
|
|
1
spec/support/files/qp_geometry_value.txt
Normal file
1
spec/support/files/qp_geometry_value.txt
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue