From 1749dea0e2ff86726d22a9657a277a75f4018104 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 23 Mar 2021 12:32:59 +0100 Subject: [PATCH] fix tests --- app/services/accounting_export_service.rb | 2 +- test/integration/availabilities/as_admin_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/services/accounting_export_service.rb b/app/services/accounting_export_service.rb index c86797b1a..81be782a7 100644 --- a/app/services/accounting_export_service.rb +++ b/app/services/accounting_export_service.rb @@ -33,7 +33,7 @@ class AccountingExportService invoices = Invoice.where('created_at >= ? AND created_at <= ?', start_date, end_date).order('created_at ASC') invoices = invoices.where('total > 0') unless export_zeros invoices.each do |i| - puts "processing invoice #{i.id}..." + puts "processing invoice #{i.id}..." unless Rails.env.test? content << generate_rows(i) end diff --git a/test/integration/availabilities/as_admin_test.rb b/test/integration/availabilities/as_admin_test.rb index 41df807fe..37b378768 100644 --- a/test/integration/availabilities/as_admin_test.rb +++ b/test/integration/availabilities/as_admin_test.rb @@ -124,8 +124,8 @@ module Availabilities 'expected end_at = start_at + 4 slots of 90 minutes' # Check the recurrence - assert_equal (availability[:start_at].to_date + 2.weeks), - availability[:end_date].to_date, + assert_equal (availability[:start_at].to_datetime + 2.weeks).to_date, + availability[:end_date].to_datetime.utc.to_date, 'expected end_date = start_at + 2 weeks' end end