Commit 4f3406dc3ab3bfbeda6603d1f663cb8ccd78577a

Authored by Nathan Broadbent
1 parent 8e897131
Exists in master and in 1 other branch production

Fix spec to do with html escaping emails.

app/views/mailer/err_notification.html.haml
... ... @@ -23,7 +23,7 @@
23 23 %td.content(valign="top")
24 24 %div
25 25 %p.heading ERROR MESSAGE:
26   - %p= raw(@notice.err.message)
  26 + %p= @notice.err.message
27 27 %p.heading WHERE:
28 28 %p.monospace
29 29 = @notice.err.where
... ...
spec/mailers/mailer_spec.rb
... ... @@ -5,10 +5,11 @@ describe Mailer do
5 5 include EmailSpec::Helpers
6 6 include EmailSpec::Matchers
7 7  
8   - it "should not html-escape the notice's message" do
  8 + it "should html-escape the notice's message for the html part" do
9 9 @notice = Factory(:notice, :message => "class < ActionController::Base")
10 10 @email = Mailer.err_notification(@notice)
11   - @email.should have_body_text("class < ActionController::Base")
  11 + @email.should have_body_text("class &lt; ActionController::Base")
12 12 end
13 13 end
14 14 end
  15 +
... ...