aboutsummaryrefslogtreecommitdiffstats
path: root/spec/mailers
diff options
context:
space:
mode:
authorHenare Degan <henare.degan@gmail.com>2015-04-27 14:46:39 +1000
committerHenare Degan <henare.degan@gmail.com>2015-04-27 15:20:39 +1000
commitb0445596de6f4d3c8429ef21f99f6c9eb760dbac (patch)
treee0903c90b4a1a98422315baf9989c708153cd033 /spec/mailers
parentd329f7b3606fca4f0d5261a06f79a13012a018b2 (diff)
Don't put HTML entities in requires admin email subject lines
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/request_mailer_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/mailers/request_mailer_spec.rb b/spec/mailers/request_mailer_spec.rb
index 17243d658..39216e6ab 100644
--- a/spec/mailers/request_mailer_spec.rb
+++ b/spec/mailers/request_mailer_spec.rb
@@ -423,7 +423,7 @@ describe RequestMailer, 'requires_admin' do
:name => 'Bruce Jones')
@info_request = mock_model(InfoRequest, :user => user,
:described_state => 'error_message',
- :title => 'Test request',
+ :title => "It's a Test request",
:url_title => 'test_request',
:law_used_short => 'FOI',
:id => 123)
@@ -439,4 +439,7 @@ describe RequestMailer, 'requires_admin' do
mail.body.should include 'Something has gone wrong'
end
+ it 'should not create HTML entities in the subject line' do
+ expect(RequestMailer.requires_admin(@info_request).subject).to eq "FOI response requires admin (error_message) - It's a Test request"
+ end
end