correctif(Administrateurs::Archives#index): mauvaise comparaison

This commit is contained in:
Martin 2022-11-02 14:04:52 +01:00
parent 7e97199b7e
commit e56441b7f5
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@
%tbody %tbody
- count_dossiers_termines_by_month.each do |date, count| - 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) - weight = estimate_weight(matching_archive, count, average_dossier_weight)
%tr %tr

View file

@ -17,7 +17,7 @@ RSpec.describe 'shared/archives/_table.html.haml', type: :view do
it 'renders archive by month with estimate_weight' do it 'renders archive by month with estimate_weight' do
expect(subject).to have_text("Janvier 2022") expect(subject).to have_text("Janvier 2022")
expect(subject).to have_text("Télécharger") expect(subject).to have_text("Télécharger")
expect(subject).to have_text("5 ko") expect(subject).to have_text("338 ko")
end end
end end