fix(prefill): don't mark the dossier as prefilled when it's not (#8464)

A dossier should not be marked as prefilled when it's not, meaning
when no prefill params are given.
This commit is contained in:
Sébastien Carceles 2023-01-19 11:51:56 +01:00 committed by GitHub
parent 51e97b2d89
commit 0046338e6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -17,7 +17,9 @@ RSpec.describe DossierPrefillableConcern do
context 'when champs_public_attributes is empty' do
let(:values) { [] }
it_behaves_like 'a dossier marked as prefilled'
it "doesn't mark the dossier as prefilled" do
expect { fill }.not_to change { dossier.reload.prefilled }.from(nil)
end
it "doesn't change champs_public" do
expect { fill }.not_to change { dossier.champs_public.to_a }