Permalink
Browse files

Text based emails need not be escaped

  • Loading branch information...
practicingruby committed Sep 25, 2012
1 parent a7b01d0 commit 223ca92a0b769713ce3c2137de76a8f34f06647e
@@ -1 +1 @@
<%= @body %>
<%= @body.html_safe %>
@@ -0,0 +1,14 @@
class BroadcastMailerTest < ActionMailer::TestCase
test "emails should not be escaped" do
assert ActionMailer::Base.deliveries.empty?

BroadcastMailer.deliver_broadcast(:body => "It's working",
:subject => "TEST",
:to => "test@test.com",
:commit => "Test")

message = ActionMailer::Base.deliveries.first

assert_equal "It's working\n", message.body.to_s
end
end

0 comments on commit 223ca92

Please sign in to comment.