diff --git a/app/mailers/bulk_upload_mailer.rb b/app/mailers/bulk_upload_mailer.rb index ebc9df7a6..cb1fac03c 100644 --- a/app/mailers/bulk_upload_mailer.rb +++ b/app/mailers/bulk_upload_mailer.rb @@ -26,7 +26,7 @@ class BulkUploadMailer < NotifyMailer { title:, filename: bulk_upload.filename, - upload_timestamp: bulk_upload.created_at, + upload_timestamp: bulk_upload.created_at.to_fs(:govuk_date_and_time), success_description:, logs_link: url, }, @@ -112,7 +112,7 @@ class BulkUploadMailer < NotifyMailer BULK_UPLOAD_FAILED_SERVICE_ERROR_TEMPLATE_ID, { filename: bulk_upload.filename, - upload_timestamp: bulk_upload.created_at, + upload_timestamp: bulk_upload.created_at.to_fs(:govuk_date_and_time), lettings_or_sales: bulk_upload.log_type, year_combo: bulk_upload.year_combo, errors: errors.map { |e| "- #{e}" }.join("\n"), diff --git a/spec/mailers/bulk_upload_mailer_spec.rb b/spec/mailers/bulk_upload_mailer_spec.rb index 323b49b8f..a0d9a3cd1 100644 --- a/spec/mailers/bulk_upload_mailer_spec.rb +++ b/spec/mailers/bulk_upload_mailer_spec.rb @@ -52,7 +52,7 @@ RSpec.describe BulkUploadMailer do personalisation: { title: "You’ve successfully uploaded 0 logs", filename: bulk_upload.filename, - upload_timestamp: bulk_upload.created_at, + upload_timestamp: bulk_upload.created_at.to_fs(:govuk_date_and_time), success_description: "The lettings 2022/23 data you uploaded has been checked. The 0 logs you uploaded are now complete.", logs_link: lettings_logs_url, }, @@ -69,7 +69,7 @@ RSpec.describe BulkUploadMailer do template_id: described_class::BULK_UPLOAD_FAILED_SERVICE_ERROR_TEMPLATE_ID, personalisation: { filename: bulk_upload.filename, - upload_timestamp: bulk_upload.created_at, + upload_timestamp: bulk_upload.created_at.to_fs(:govuk_date_and_time), lettings_or_sales: bulk_upload.log_type, year_combo: bulk_upload.year_combo, errors: "- foo\n- bar",