diff options
author | MQuy <sugiacupit@gmail.com> | 2016-11-30 21:54:44 +0800 |
---|---|---|
committer | MQuy <sugiacupit@gmail.com> | 2016-11-30 22:18:14 +0800 |
commit | c4639b77378675f16c28660f43a23f2805ee6392 (patch) | |
tree | 3a6ceaec13a7f75340007b4aff9d9ecfc27ec5cc /actionmailer/test | |
parent | 162e889f16ceb47978fe9bc81ac0b46672f05ff0 (diff) | |
download | rails-c4639b77378675f16c28660f43a23f2805ee6392.tar.gz rails-c4639b77378675f16c28660f43a23f2805ee6392.tar.bz2 rails-c4639b77378675f16c28660f43a23f2805ee6392.zip |
allow context type when set body mail
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 3bca69890d..76f558a961 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 inclued 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) |