From 01b72f7adf2b46741f30b7c15ec72fc4e96338d7 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 11 Nov 2020 11:19:20 +0000 Subject: [PATCH] Fix missing html layout for user_mailer emails This was caused by renaming the mailer without renaming the layout. Added a test to cover this in future. Fixes #2903 --- .../layouts/{notifier.html.erb => user_mailer.html.erb} | 0 test/mailers/user_mailer_test.rb | 9 +++++++++ 2 files changed, 9 insertions(+) rename app/views/layouts/{notifier.html.erb => user_mailer.html.erb} (100%) create mode 100644 test/mailers/user_mailer_test.rb diff --git a/app/views/layouts/notifier.html.erb b/app/views/layouts/user_mailer.html.erb similarity index 100% rename from app/views/layouts/notifier.html.erb rename to app/views/layouts/user_mailer.html.erb diff --git a/test/mailers/user_mailer_test.rb b/test/mailers/user_mailer_test.rb new file mode 100644 index 000000000..23136951c --- /dev/null +++ b/test/mailers/user_mailer_test.rb @@ -0,0 +1,9 @@ +require "test_helper" + +class UserMailerTest < ActionMailer::TestCase + def test_html_layout_is_used + email = UserMailer.message_notification(create(:message)) + + assert_match(/