Merge pull request #7994 from mfo/US/fix-archive-table

correctif(Administrateurs::Archives#index): mauvaise comparaison sur les date des archives
This commit is contained in:
mfo 2022-11-02 14:22:47 +01:00 committed by GitHub
commit b62e5b6fc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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

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
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