aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-12-04 12:00:11 +0000
committerLouise Crow <louise.crow@gmail.com>2012-12-04 12:00:11 +0000
commit49c8a6131acbdfe151fe1ab0a0e08616865a4e08 (patch)
tree6a63158d97f50d8f01d4e6e0ce83c5def30a768f /spec/lib
parentfe7efca6bb8fffea27a6e95556c2dd7ecb799f6a (diff)
Rewrite and move spec so that it tests the mail handler method.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/mail_handler/mail_handler_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/mail_handler/mail_handler_spec.rb b/spec/lib/mail_handler/mail_handler_spec.rb
index 6043bf5bc..dc147f32b 100644
--- a/spec/lib/mail_handler/mail_handler_spec.rb
+++ b/spec/lib/mail_handler/mail_handler_spec.rb
@@ -151,6 +151,13 @@ describe 'when deriving a name, email and formatted address from a message from
[name, email, address].should == expected_result
end
+ it 'should correctly render a name with quoted commas' do
+ should_render_from_address('"Clare College, Cambridge" <test@test.test>',
+ ['Clare College, Cambridge',
+ 'test@test.test',
+ '"Clare College, Cambridge" <test@test.test>'])
+ end
+
it 'should correctly reproduce a simple name and email that does not need quotes' do
should_render_from_address('"FOI Person" <foiperson@localhost>',
['FOI Person',