aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/mail_handler/backends/mail_backend_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/lib/mail_handler/backends/mail_backend_spec.rb b/spec/lib/mail_handler/backends/mail_backend_spec.rb
index 588033faf..eb1d4b167 100644
--- a/spec/lib/mail_handler/backends/mail_backend_spec.rb
+++ b/spec/lib/mail_handler/backends/mail_backend_spec.rb
@@ -142,4 +142,21 @@ DOC
end
+ describe :address_from_name_and_email do
+
+ it 'returns an address string' do
+ expected = 'Test User <test@example.com>'
+ address_from_name_and_email('Test User', 'test@example.com').should == expected
+ end
+
+ it 'does not change the name passed to it' do
+ original = "brønn"
+ name = original.dup
+ address_from_name_and_email(name, 'test@example.com')
+ name.should == original
+ end
+
+ end
+
+
end