mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
35 lines
844 B
Ruby
35 lines
844 B
Ruby
require 'abstract_unit'
|
|
|
|
class TmailCompatTest < ActiveSupport::TestCase
|
|
|
|
def test_set_content_type_raises_deprecation_warning
|
|
mail = Mail.new
|
|
assert_deprecated do
|
|
assert_nothing_raised do
|
|
mail.set_content_type "text/plain"
|
|
end
|
|
end
|
|
assert_equal mail.mime_type, "text/plain"
|
|
end
|
|
|
|
def test_transfer_encoding_raises_deprecation_warning
|
|
mail = Mail.new
|
|
assert_deprecated do
|
|
assert_nothing_raised do
|
|
mail.transfer_encoding "base64"
|
|
end
|
|
end
|
|
assert_equal mail.content_transfer_encoding, "base64"
|
|
end
|
|
|
|
def test_transfer_encoding_setter_raises_deprecation_warning
|
|
mail = Mail.new
|
|
assert_deprecated do
|
|
assert_nothing_raised do
|
|
mail.transfer_encoding = "base64"
|
|
end
|
|
end
|
|
assert_equal mail.content_transfer_encoding, "base64"
|
|
end
|
|
|
|
end
|