From 095f158444efbdc3d45d6c5b50cd28521d463bef Mon Sep 17 00:00:00 2001 From: jazairi <16103405+jazairi@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:40:13 -0500 Subject: [PATCH] Remove ProQuest consent field from receipt email Why these changes are being introduced: We removed the ProQuest consent field from the thesis submission form, but forgot to remove the field from the mailer. Thus, when a grad student submits their thesis, they see this nonexistent field in their confirmation email. Relevant ticket(s): N/A How this addresses that need: This removes the field from the mailer. Side effects of this change: None. --- app/views/receipt_mailer/receipt_email.html.erb | 3 --- test/mailers/receipt_mailer_test.rb | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/receipt_mailer/receipt_email.html.erb b/app/views/receipt_mailer/receipt_email.html.erb index 4aa5d5f4..92e43542 100644 --- a/app/views/receipt_mailer/receipt_email.html.erb +++ b/app/views/receipt_mailer/receipt_email.html.erb @@ -35,9 +35,6 @@ The information we have on record is listed below.

Abstract:
<%= simple_format(@thesis.abstract, {}, wrapper_tag: "p") %> Notes: <%= @thesis.author_note %>
-<% if satisfies_advanced_degree?(@thesis) %> - Consent to send thesis to ProQuest: <%= render_proquest_status(@thesis) %> -<% end %>

Let us know if you have any questions. And again, congratulations diff --git a/test/mailers/receipt_mailer_test.rb b/test/mailers/receipt_mailer_test.rb index ff2b93d3..b87a9dcc 100644 --- a/test/mailers/receipt_mailer_test.rb +++ b/test/mailers/receipt_mailer_test.rb @@ -18,7 +18,9 @@ class ReceiptMailerTest < ActionMailer::TestCase end end - test 'confirmation emails for graduate theses include ProQuest consent' do + # This used to be a test that the emails _do_ include ProQuest consent, but we removed that feature in December 2024. + # This test is to ensure that grad students do not see a nonexistent metadata field in their receipt email. + test 'confirmation emails for graduate theses do not include ProQuest consent' do ClimateControl.modify DISABLE_ALL_EMAIL: 'false' do thesis = theses(:doctor) user = users(:basic) @@ -29,7 +31,7 @@ class ReceiptMailerTest < ActionMailer::TestCase email.deliver_now end - assert_match 'Consent to send thesis to ProQuest: Opt-in status not reconciled', email.body.to_s + refute_match 'Consent to send thesis to ProQuest:', email.body.to_s end end