diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-05-07 10:16:32 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-05-07 10:16:32 +0100 |
commit | 2cfad24e21f954099ae84d782373d3bc6336db37 (patch) | |
tree | 6a629e96efe74bf72b7c1299f6a8b1d0a4ec8f87 /spec/models | |
parent | 0bb2950c79674ca968ea018c0e7242fba19b9c81 (diff) | |
parent | 3f23471e6507f1da77e0b588f005ebcdeda0350d (diff) |
Merge branch 'hotfix/0.9.0.2'0.9.0.2
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/contact_mailer_spec.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/models/contact_mailer_spec.rb b/spec/models/contact_mailer_spec.rb index 202e45758..3af55ad77 100644 --- a/spec/models/contact_mailer_spec.rb +++ b/spec/models/contact_mailer_spec.rb @@ -1,8 +1,22 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') -describe ContactMailer, " when blah" do +describe ContactMailer, "when sending mail with a SafeBuffer name param (as when a suspended user + sends a message)" do before do + + end + + it 'should set a "from" address correctly' do + mail = ContactMailer.create_to_admin_message('test (account suspended)'.html_safe, + 'test@example.com', + 'Test subject', + 'Test message', + mock_model(User, :url_name => 'test_user'), + mock_model(InfoRequest, :url_title => 'test_request'), + mock_model(PublicBody, :url_name => 'test_public_body')) + mail.from.should_not be_nil end + end |