integrate a mininum weight for the average dossier weight

before this commit, the average dossier weight took account only pieces
justificatives. With this commit, we add a minimum weight for other
files included in an archive like pdf_export, log operations,
attachments added to traitements. This minimum weight is set arbitrary,
from the observation of some random procedures in production
This commit is contained in:
Christophe Robillard 2021-07-06 15:00:33 +02:00
parent cedef676b0
commit bc07a875eb
2 changed files with 3 additions and 2 deletions

View file

@ -1026,7 +1026,7 @@ describe Procedure do
end
it 'estimates average dossier weight' do
expect(procedure.reload.average_dossier_weight).to eq 5
expect(procedure.reload.average_dossier_weight).to eq(5 + Procedure::MIN_WEIGHT)
end
end