refactor: api_geo_services raises if wrong dep or city code

This commit is contained in:
simon lehericey 2024-04-11 11:56:53 +02:00
parent 5b3277bb31
commit c77b66feef
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5
2 changed files with 0 additions and 9 deletions

View file

@ -126,9 +126,6 @@ class APIGeoService
return fallback if department_code.nil? || city_code.nil?
commune_name(department_code, city_code) || fallback
rescue StandardError
fallback
end
private

View file

@ -130,11 +130,5 @@ describe APIGeoService do
it { is_expected.to eq('Paris') }
end
context 'with a wrong department' do
let(:department_code) { 'wrong' }
it { is_expected.to eq('Paris') }
end
end
end