aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/fixtures/raw_emails.yml4
-rw-r--r--spec/models/incoming_message_spec.rb5
2 files changed, 7 insertions, 2 deletions
diff --git a/spec/fixtures/raw_emails.yml b/spec/fixtures/raw_emails.yml
index 6e43b1a9a..46f7ec09a 100644
--- a/spec/fixtures/raw_emails.yml
+++ b/spec/fixtures/raw_emails.yml
@@ -1,8 +1,8 @@
useless_raw_email:
id: 1
data: |
- From: FOI Person <foiperson@localhost>
- To: Bob Smith <bob@localhost>
+ From: "FOI Person" <foiperson@localhost>
+ To: "Bob Smith" <bob@localhost>
Date: Tue, 13 Nov 2007 11:39:55 +0000
NoCc: foi+request-1-4b571715@cat
Bcc:
diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb
index 63a1680c4..c1c846275 100644
--- a/spec/models/incoming_message_spec.rb
+++ b/spec/models/incoming_message_spec.rb
@@ -11,6 +11,11 @@ describe IncomingMessage, " when dealing with incoming mail" do
@im.sent_at.should == @im.mail.date
end
+ it "should be able to parse emails with quoted commas in" do
+ em = "\"Clare College, Cambridge\" <test@test.test>"
+ TMail::Address.parse(em)
+ end
+
end