From c4639b77378675f16c28660f43a23f2805ee6392 Mon Sep 17 00:00:00 2001 From: MQuy Date: Wed, 30 Nov 2016 21:54:44 +0800 Subject: allow context type when set body mail --- actionmailer/test/base_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionmailer/test') 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) -- cgit v1.2.3