diff --git a/app/views/report_mailer/publication_results_email.html.erb b/app/views/report_mailer/publication_results_email.html.erb
index b7100269..19bd4016 100644
--- a/app/views/report_mailer/publication_results_email.html.erb
+++ b/app/views/report_mailer/publication_results_email.html.erb
@@ -7,7 +7,7 @@
- Total theses in output queue: <%= @results[:total] %>
- Total theses updated: <%= @results[:processed] %>
- - Total theses sent to preservation: <%= @results[:preservation_ready] %>
+
- Total theses sent to preservation: <%= @results[:preservation_ready].count %>
- Errors found: <%= @results[:errors].count %>
diff --git a/test/mailers/report_mailer_test.rb b/test/mailers/report_mailer_test.rb
index 6b8bda79..1d76eb31 100644
--- a/test/mailers/report_mailer_test.rb
+++ b/test/mailers/report_mailer_test.rb
@@ -24,7 +24,8 @@ class ReportMailerTest < ActionMailer::TestCase
test 'sends reports for DSpace publication results' do
ClimateControl.modify DISABLE_ALL_EMAIL: 'false' do
- results = { total: 2, processed: 1, errors: ["Couldn't find Thesis with 'id'=9999999999999"] }
+ results = { total: 2, processed: 1, errors: ["Couldn't find Thesis with 'id'=9999999999999"],
+ preservation_ready: [] }
email = ReportMailer.publication_results_email(results)
assert_emails 1 do
@@ -37,6 +38,7 @@ class ReportMailerTest < ActionMailer::TestCase
assert_match 'Total theses in output queue: 2', email.body.to_s
assert_match 'Total theses updated: 1', email.body.to_s
assert_match 'Errors found: 1', email.body.to_s
+ assert_match 'Total theses sent to preservation: 0', email.body.to_s
assert_match 'Couldn't find Thesis with 'id'=9999999999999', email.body.to_s
end
end