diff options
Diffstat (limited to 'actionmailer/test/mailers/base_mailer.rb')
-rw-r--r-- | actionmailer/test/mailers/base_mailer.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/actionmailer/test/mailers/base_mailer.rb b/actionmailer/test/mailers/base_mailer.rb index 8fca6177bd..bd991e209e 100644 --- a/actionmailer/test/mailers/base_mailer.rb +++ b/actionmailer/test/mailers/base_mailer.rb @@ -38,7 +38,7 @@ class BaseMailer < ActionMailer::Base end def attachment_with_hash - attachments['invoice.jpg'] = { data: "\312\213\254\232)b", + attachments['invoice.jpg'] = { data: ::Base64.encode64("\312\213\254\232)b"), mime_type: "image/x-jpg", transfer_encoding: "base64" } mail @@ -119,8 +119,12 @@ class BaseMailer < ActionMailer::Base def without_mail_call end - def with_nil_as_return_value(hash = {}) - mail(:template_name => "welcome") + def with_nil_as_return_value + mail(template_name: "welcome") nil end + + def with_subject_interpolations + mail(subject: default_i18n_subject(rapper_or_impersonator: 'Slim Shady'), body: '') + end end |