diff --git a/app/views/shared/archives/_table.html.haml b/app/views/shared/archives/_table.html.haml index f63d6aa8d..87d65317f 100644 --- a/app/views/shared/archives/_table.html.haml +++ b/app/views/shared/archives/_table.html.haml @@ -8,7 +8,7 @@ %tbody - count_dossiers_termines_by_month.each do |date, count| - - matching_archive = archives.find { |archive| archive.time_span_type == 'monthly' && archive.month == date.month } + - matching_archive = archives.find { |archive| archive.time_span_type == 'monthly' && archive.month == date } - weight = estimate_weight(matching_archive, count, average_dossier_weight) %tr diff --git a/spec/views/shared/archives/_table.html.haml_spec.rb b/spec/views/shared/archives/_table.html.haml_spec.rb index 298603b34..1d4436dc1 100644 --- a/spec/views/shared/archives/_table.html.haml_spec.rb +++ b/spec/views/shared/archives/_table.html.haml_spec.rb @@ -17,7 +17,7 @@ RSpec.describe 'shared/archives/_table.html.haml', type: :view do it 'renders archive by month with estimate_weight' do expect(subject).to have_text("Janvier 2022") expect(subject).to have_text("Télécharger") - expect(subject).to have_text("5 ko") + expect(subject).to have_text("338 ko") end end