From 43c0374f701dc6117efa602eeb76cb5e6dcad5ea Mon Sep 17 00:00:00 2001 From: Cory McDonald Date: Wed, 19 Jun 2019 16:43:15 -0500 Subject: [PATCH] Remove unused mailers (#1975) * Remove unused mailers * Delete file --- app/mailers/publisher_mailer.rb | 17 ----------------- .../uphold_account_changed.html.slim | 9 --------- config/locales/en.yml | 4 ---- .../previews/publisher_mailer_preview.rb | 3 --- test/mailers/publisher_mailer_test.rb | 13 ------------- 5 files changed, 46 deletions(-) delete mode 100644 app/views/publisher_mailer/uphold_account_changed.html.slim diff --git a/app/mailers/publisher_mailer.rb b/app/mailers/publisher_mailer.rb index 8b7027dbf8..4c88da14cd 100644 --- a/app/mailers/publisher_mailer.rb +++ b/app/mailers/publisher_mailer.rb @@ -121,14 +121,6 @@ def notify_email_change(publisher) ) end - def uphold_account_changed(publisher) - @publisher = publisher - mail( - to: @publisher.email, - subject: default_i18n_subject - ) - end - def uphold_kyc_incomplete(publisher) @publisher = publisher mail( @@ -145,15 +137,6 @@ def uphold_member_restricted(publisher) ) end - def statement_ready(publisher_statement) - @publisher_statement = publisher_statement - @publisher = publisher_statement.publisher - mail( - to: @publisher.email, - subject: default_i18n_subject - ) - end - def suspend_publisher(publisher) @publisher = publisher mail( diff --git a/app/views/publisher_mailer/uphold_account_changed.html.slim b/app/views/publisher_mailer/uphold_account_changed.html.slim deleted file mode 100644 index 9016e3273e..0000000000 --- a/app/views/publisher_mailer/uphold_account_changed.html.slim +++ /dev/null @@ -1,9 +0,0 @@ -/ Sent as soon as a publisher fills out the first step. -- content_for(:title) do - h3= t ".title" - -p.salutation= t "publisher_mailer.shared.salutation", name: @publisher.name || name_from_email(@publisher.email) - -p= t ".body" - -.notice= t "shared.support_note_html" diff --git a/config/locales/en.yml b/config/locales/en.yml index e553911486..271fda039e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -365,10 +365,6 @@ en: body_html: We have noticed some unusual or suspicious contributions to your Brave Rewards account. As a result we have temporarily frozen payments made to your account.

Suspicious contributions can include unreasonably large contributions for small channels and/or contribution that solely originate from the user growth pool.

Please contact us at support+publishers@basicattentiontoken.org. closing_html: Thank you.
The Brave Rewards Team contact_support: If you did not make this change yourself, please contact support ASAP - uphold_account_changed: - subject: Your Brave Rewards Uphold account has been updated - title: Publisher Uphold account changed - body: This email confirms your Uphold account through Brave Rewards has been updated. uphold_kyc_incomplete: subject: Please verify your Uphold identity body_html: | diff --git a/test/mailers/previews/publisher_mailer_preview.rb b/test/mailers/previews/publisher_mailer_preview.rb index 302866d477..156069bef3 100644 --- a/test/mailers/previews/publisher_mailer_preview.rb +++ b/test/mailers/previews/publisher_mailer_preview.rb @@ -24,9 +24,6 @@ def verification_done PublisherMailer.verification_done(Channel.first) end - def uphold_account_changed - PublisherMailer.uphold_account_changed(Publisher.first) - end def wallet_not_connected PublisherMailer.wallet_not_connected(Publisher.first) diff --git a/test/mailers/publisher_mailer_test.rb b/test/mailers/publisher_mailer_test.rb index 254e5313a3..cfa5281863 100644 --- a/test/mailers/publisher_mailer_test.rb +++ b/test/mailers/publisher_mailer_test.rb @@ -10,19 +10,6 @@ class PublisherMailerTest < ActionMailer::TestCase Rails.application.secrets[:api_eyeshade_offline] = @prev_eyeshade_offline end - test "uphold_account_changed" do - publisher = publishers(:default) - email = PublisherMailer.uphold_account_changed(publisher) - - # # Send the email, then test that it got queued - assert_emails 1 do - email.deliver_now - end - - assert_equal ['brave-publishers@localhost.local'], email.from - assert_equal [publisher.email], email.to - end - test "wallet_not_connected" do publisher = publishers(:uphold_connected) email = PublisherMailer.wallet_not_connected(publisher)