diff --git a/app/models/logic/champ_value.rb b/app/models/logic/champ_value.rb index e478aed1e..5a096f381 100644 --- a/app/models/logic/champ_value.rb +++ b/app/models/logic/champ_value.rb @@ -53,8 +53,6 @@ class Logic::ChampValue < Logic::Term targeted_champ.selected_options when "Champs::DepartementChamp", "Champs::RegionChamp" targeted_champ.code - when "Champs::CommuneChamp", "Champs::EpciChamp" - targeted_champ.code_departement end end diff --git a/spec/models/routing_engine_spec.rb b/spec/models/routing_engine_spec.rb index 4692638d7..23308d999 100644 --- a/spec/models/routing_engine_spec.rb +++ b/spec/models/routing_engine_spec.rb @@ -122,7 +122,7 @@ describe RoutingEngine, type: :model do context 'with a matching rule' do before do - gi_2.update(routing_rule: ds_eq(champ_value(communes_tdc.stable_id), constant('92'))) + gi_2.update(routing_rule: ds_in_departement(champ_value(communes_tdc.stable_id), constant('92'))) dossier.champs.first.update(code_postal: '92500', external_id: '92063') end @@ -141,7 +141,7 @@ describe RoutingEngine, type: :model do context 'with a matching rule' do before do - gi_2.update(routing_rule: ds_eq(champ_value(epci_tdc.stable_id), constant('42'))) + gi_2.update(routing_rule: ds_in_departement(champ_value(epci_tdc.stable_id), constant('42'))) dossier.champs.first.update_columns( external_id: 244200895, value: 'CC du Pilat Rhodanien',