diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-01-06 06:02:22 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-01-06 06:03:41 -0500 |
commit | e482dce0ed35bed2ab556e95a9f9d1124d65fa15 (patch) | |
tree | a648e4d2d810e2d4b362b279d7f7f75d4a7290cb /actionmailer/test | |
parent | d06d71bb54b17d9a7e1b9d1e7084c2bc1e7a38bc (diff) | |
parent | f091bd67b3ef5f4cd85dbd70cbd11e9ad2711562 (diff) | |
download | rails-e482dce0ed35bed2ab556e95a9f9d1124d65fa15.tar.gz rails-e482dce0ed35bed2ab556e95a9f9d1124d65fa15.tar.bz2 rails-e482dce0ed35bed2ab556e95a9f9d1124d65fa15.zip |
Merge pull request #27227 from MQuy/allow-custom-content-type-in-mail-body
Allow to custom content type when setting mailer body
Diffstat (limited to 'actionmailer/test')
-rw-r--r-- | actionmailer/test/base_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 91049e33f9..490aaf33fc 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -140,6 +140,11 @@ class BaseTest < ActiveSupport::TestCase assert_equal("multipart/mixed", email.mime_type) end + test "set mime type to text/html when attachment is included and body is set" do + email = BaseMailer.attachment_with_content(body: "Hello there", content_type: "text/html") + assert_equal("text/html", email.mime_type) + end + test "adds the rendered template as part" do email = BaseMailer.attachment_with_content assert_equal(2, email.parts.length) |