bug(dossier.export): lose value of champ when updating the type de champ from integer_number -> decimal_number

This commit is contained in:
mfo 2024-09-06 16:25:56 +02:00
parent fcc2b10198
commit ad33934059
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC

View file

@ -2003,8 +2003,8 @@ describe Dossier, type: :model do
it 'give me back my decimal number' do
procedure.publish!
dossier
# integer_number_type_de_champ.update(type_champ: :decimal_number)
# procedure.update(published_revision: procedure.draft_revision, draft_revision: procedure.create_new_revision)
integer_number_type_de_champ.update(type_champ: :decimal_number)
procedure.update(published_revision: procedure.draft_revision, draft_revision: procedure.create_new_revision)
dossier.reload
expect(dossier.champs_for_export(procedure.types_de_champ_for_procedure_presentation.not_repetition.to_a)).to eq([['c1', 42]])