diff options
author | francis <francis> | 2009-04-08 07:31:07 +0000 |
---|---|---|
committer | francis <francis> | 2009-04-08 07:31:07 +0000 |
commit | 0960200802d7c87940cd0c7348d2f612c4f15d65 (patch) | |
tree | 9ed72928a3759b4a7e0d0cebb1710f6a8a7d2e9c /spec/models/info_request_spec.rb | |
parent | 2424bdf7da5346a6bf28dbaf9ff4d9bfd70b070c (diff) |
TMail rebuilds address when constructing emails. Move our more
aggressive quoting rule into a TMail monkey patch proper so it is always called
when constructing emails, and remove the hacky function
(Address.encode_quoted_string) it used to call in special places
Diffstat (limited to 'spec/models/info_request_spec.rb')
-rw-r--r-- | spec/models/info_request_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/models/info_request_spec.rb b/spec/models/info_request_spec.rb index 7e87d0900..3147965c4 100644 --- a/spec/models/info_request_spec.rb +++ b/spec/models/info_request_spec.rb @@ -34,6 +34,14 @@ describe InfoRequest do @info_request.incoming_email.should_not be_nil end + it "should have a sensible incoming name and email" do + @info_request.incoming_name_and_email.should == "Bob Smith <" + @info_request.incoming_email + ">" + end + + it "should have a sensible recipient name and email" do + @info_request.recipient_name_and_email.should == "FOI requests at TGQ <geraldine-requests@localhost>" + end + it "should recognise its own incoming email" do incoming_email = @info_request.incoming_email found_info_request = InfoRequest.find_by_incoming_email(incoming_email) @@ -176,4 +184,4 @@ describe InfoRequest do end -end
\ No newline at end of file +end |