aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-06-03 13:10:46 +0100
committerLouise Crow <louise.crow@gmail.com>2013-06-03 17:16:30 +0100
commite503bf89c973dad5bdbffb3e2ec4d15cf063bf91 (patch)
tree9fcbd509d2cfac7904b0b9a854df61956757ef72 /spec/lib
parentd5725cac044cc46245edc209e7c61c717e0d23db (diff)
Parse the 'to' address as if on a real mail to trigger quoted string encoding.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/mail_handler/mail_handler_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/mail_handler/mail_handler_spec.rb b/spec/lib/mail_handler/mail_handler_spec.rb
index fde21b0a7..272b56d0b 100644
--- a/spec/lib/mail_handler/mail_handler_spec.rb
+++ b/spec/lib/mail_handler/mail_handler_spec.rb
@@ -478,3 +478,11 @@ describe 'when getting attachment attributes' do
end
end
end
+
+describe 'when getting the address part from an address string' do
+
+ it 'should handle non-ascii characters in the name input' do
+ address = "\"Someone’s name\" <test@example.com>"
+ MailHandler.address_from_string(address).should == 'test@example.com'
+ end
+end