don't clean the siret champ value

Cleaning the value is useless, when fetching the etablissement,
as the value will be re-written by the dossier update, when the user
fills in the dossier.
This commit is contained in:
Sébastien Carceles 2023-01-11 15:04:45 +01:00 committed by sebastiencarceles
parent 3eb76d8a43
commit df2eaa9542
3 changed files with 9 additions and 19 deletions

View file

@ -16,8 +16,6 @@ RSpec.describe SiretChampEtablissementFetchableConcern do
subject(:fetch_etablissement!) { champ.fetch_etablissement!(siret, build_stubbed(:user)) }
shared_examples 'an error occured' do |error|
it { expect { fetch_etablissement! }.to change { champ.reload.value }.to('') }
it { expect { fetch_etablissement! }.to change { champ.reload.etablissement }.to(nil) }
it { expect { fetch_etablissement! }.to change { Etablissement.count }.by(-1) }