Catch error 500 for quartier prioritaire

This commit is contained in:
Xavier J 2016-12-20 12:27:53 +01:00
parent 39a023b3e2
commit 83444ab54c
2 changed files with 13 additions and 0 deletions

View file

@ -20,6 +20,16 @@ describe CARTO::SGMAP::API do
end
end
context 'when request return 500' do
let(:geojson) { File.read('spec/support/files/geojson/request_qp.json') }
let(:status) { 500 }
let(:body) { 'toto' }
it 'raises RestClient::ResourceNotFound' do
expect { subject }.to raise_error(RestClient::ResourceNotFound)
end
end
context 'when geojson exist' do
let(:geojson) { File.read('spec/support/files/geojson/request_qp.json') }
let(:status) { 200 }