Browse Source

Pass log_type to complete log template (#1666)

pull/1667/head
Jack 2 years ago committed by GitHub
parent
commit
e87a97a634
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      app/mailers/bulk_upload_mailer.rb
  2. 1
      spec/mailers/bulk_upload_mailer_spec.rb

1
app/mailers/bulk_upload_mailer.rb

@ -70,6 +70,7 @@ class BulkUploadMailer < NotifyMailer
upload_timestamp: bulk_upload.created_at.to_fs(:govuk_date_and_time), upload_timestamp: bulk_upload.created_at.to_fs(:govuk_date_and_time),
success_description:, success_description:,
logs_link: url, logs_link: url,
log_type: bulk_upload.log_type,
}, },
) )
end end

1
spec/mailers/bulk_upload_mailer_spec.rb

@ -44,6 +44,7 @@ RSpec.describe BulkUploadMailer do
personalisation: { personalisation: {
title: "You’ve successfully uploaded 0 logs", title: "You’ve successfully uploaded 0 logs",
filename: bulk_upload.filename, filename: bulk_upload.filename,
log_type: "lettings",
upload_timestamp: bulk_upload.created_at.to_fs(:govuk_date_and_time), 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.", 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("[years][]" => "", "[status][]" => "", user: :all, organisation_select: :all), logs_link: lettings_logs_url("[years][]" => "", "[status][]" => "", user: :all, organisation_select: :all),

Loading…
Cancel
Save