From c77b66feef22f2ef11c90f12ae84270e241e324c Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Thu, 11 Apr 2024 11:56:53 +0200 Subject: [PATCH] refactor: api_geo_services raises if wrong dep or city code --- app/services/api_geo_service.rb | 3 --- spec/services/api_geo_service_spec.rb | 6 ------ 2 files changed, 9 deletions(-) diff --git a/app/services/api_geo_service.rb b/app/services/api_geo_service.rb index d8c0f1c50..18e42f451 100644 --- a/app/services/api_geo_service.rb +++ b/app/services/api_geo_service.rb @@ -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 diff --git a/spec/services/api_geo_service_spec.rb b/spec/services/api_geo_service_spec.rb index 95faa29ba..7dda79ec7 100644 --- a/spec/services/api_geo_service_spec.rb +++ b/spec/services/api_geo_service_spec.rb @@ -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