aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorMQuy <sugiacupit@gmail.com>2016-11-30 21:54:44 +0800
committerMQuy <sugiacupit@gmail.com>2016-11-30 22:18:14 +0800
commitc4639b77378675f16c28660f43a23f2805ee6392 (patch)
tree3a6ceaec13a7f75340007b4aff9d9ecfc27ec5cc /actionmailer/test
parent162e889f16ceb47978fe9bc81ac0b46672f05ff0 (diff)
downloadrails-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.rb5
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)