aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-12-06 13:53:50 -0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-12-06 13:53:50 -0800
commit731bfa7cf45b8b849e63990d933fc65a14a6b860 (patch)
tree0953a7e63b7288a3ee729de02ac2f6d1f9c44d65 /test/unit
parenta1d449e061d163fc0f6cb8c966d9ebf70923b665 (diff)
downloadrails-731bfa7cf45b8b849e63990d933fc65a14a6b860.tar.gz
rails-731bfa7cf45b8b849e63990d933fc65a14a6b860.tar.bz2
rails-731bfa7cf45b8b849e63990d933fc65a14a6b860.zip
Add address wrapping
Makes it easier to deal with addresses that may already have been converted
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/mail_ext/address_wrapping_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/mail_ext/address_wrapping_test.rb b/test/unit/mail_ext/address_wrapping_test.rb
new file mode 100644
index 0000000000..6baa360f3e
--- /dev/null
+++ b/test/unit/mail_ext/address_wrapping_test.rb
@@ -0,0 +1,11 @@
+require_relative '../../test_helper'
+
+module MailExt
+ class AddressWrappingTest < ActiveSupport::TestCase
+ test "wrap" do
+ needing_wrapping = Mail::Address.wrap("david@basecamp.com")
+ wrapping_not_needed = Mail::Address.wrap(Mail::Address.new("david@basecamp.com"))
+ assert_equal needing_wrapping.address, wrapping_not_needed.address
+ end
+ end
+end