diff --git a/spec/factories/champ.rb b/spec/factories/champ.rb index 2c8796138..943fc5355 100644 --- a/spec/factories/champ.rb +++ b/spec/factories/champ.rb @@ -170,15 +170,20 @@ FactoryBot.define do factory :champ_do_not_use_rna, class: 'Champs::RNAChamp' do value { 'W173847273' } + value_json { AddressProxy::ADDRESS_PARTS.index_by(&:itself) } end factory :champ_do_not_use_engagement_juridique, class: 'Champs::EngagementJuridiqueChamp' do + value { 'EJ' } end factory :champ_do_not_use_cojo, class: 'Champs::COJOChamp' do end factory :champ_do_not_use_rnf, class: 'Champs::RNFChamp' do + value { '075-FDD-00003-01' } + external_id { '075-FDD-00003-01' } + value_json { AddressProxy::ADDRESS_PARTS.index_by(&:itself) } end factory :champ_do_not_use_expression_reguliere, class: 'Champs::ExpressionReguliereChamp' do diff --git a/spec/tasks/maintenance/populate_rna_json_value_task_spec.rb b/spec/tasks/maintenance/populate_rna_json_value_task_spec.rb index bdb3fd559..df727227c 100644 --- a/spec/tasks/maintenance/populate_rna_json_value_task_spec.rb +++ b/spec/tasks/maintenance/populate_rna_json_value_task_spec.rb @@ -20,7 +20,7 @@ module Maintenance end it 'updates value_json' do expect { subject }.to change { element.reload.value_json } - .from(nil) + .from(anything) .to({ "street_number" => "33", "street_name" => "de Modagor", diff --git a/spec/tasks/maintenance/populate_rnf_json_value_task_spec.rb b/spec/tasks/maintenance/populate_rnf_json_value_task_spec.rb index a71eb25ad..f74ed99a1 100644 --- a/spec/tasks/maintenance/populate_rnf_json_value_task_spec.rb +++ b/spec/tasks/maintenance/populate_rnf_json_value_task_spec.rb @@ -53,7 +53,7 @@ module Maintenance it 'updates value_json' do expect { subject }.to change { element.reload.value_json } - .from(nil) + .from(anything) .to({ "street_number" => "16", "street_name" => "Rue du Général de Boissieu", @@ -79,7 +79,7 @@ module Maintenance it 'updates value_json' do expect { subject }.to change { element.reload.value_json } - .from(nil) + .from(anything) .to({ "street_number" => "16", "street_name" => "Rue du Général de Boissieu",