Commit 4f3406dc3ab3bfbeda6603d1f663cb8ccd78577a
1 parent
8e897131
Exists in
master
and in
1 other branch
Fix spec to do with html escaping emails.
Showing
2 changed files
with
4 additions
and
3 deletions
Show diff stats
app/views/mailer/err_notification.html.haml
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
23 | %td.content(valign="top") | 23 | %td.content(valign="top") |
24 | %div | 24 | %div |
25 | %p.heading ERROR MESSAGE: | 25 | %p.heading ERROR MESSAGE: |
26 | - %p= raw(@notice.err.message) | 26 | + %p= @notice.err.message |
27 | %p.heading WHERE: | 27 | %p.heading WHERE: |
28 | %p.monospace | 28 | %p.monospace |
29 | = @notice.err.where | 29 | = @notice.err.where |
spec/mailers/mailer_spec.rb
@@ -5,10 +5,11 @@ describe Mailer do | @@ -5,10 +5,11 @@ describe Mailer do | ||
5 | include EmailSpec::Helpers | 5 | include EmailSpec::Helpers |
6 | include EmailSpec::Matchers | 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 | @notice = Factory(:notice, :message => "class < ActionController::Base") | 9 | @notice = Factory(:notice, :message => "class < ActionController::Base") |
10 | @email = Mailer.err_notification(@notice) | 10 | @email = Mailer.err_notification(@notice) |
11 | - @email.should have_body_text("class < ActionController::Base") | 11 | + @email.should have_body_text("class < ActionController::Base") |
12 | end | 12 | end |
13 | end | 13 | end |
14 | end | 14 | end |
15 | + |