diff options
Diffstat (limited to 'actionmailer/test/mail_render_test.rb')
-rw-r--r-- | actionmailer/test/mail_render_test.rb | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/actionmailer/test/mail_render_test.rb b/actionmailer/test/mail_render_test.rb index 514f7ed798..3c97ad2a03 100644 --- a/actionmailer/test/mail_render_test.rb +++ b/actionmailer/test/mail_render_test.rb @@ -86,27 +86,37 @@ class RenderHelperTest < Test::Unit::TestCase def test_implicit_body mail = RenderMailer.create_implicit_body(@recipient) - assert_equal "Hello there, \n\nMr. test@localhost", mail.body.strip + # CHANGED: body returns an object now + # assert_equal "Hello there, \n\nMr. test@localhost", mail.body.strip + assert_equal "Hello there, \n\nMr. test@localhost", mail.body.decoded.strip end def test_inline_template mail = RenderMailer.create_inline_template(@recipient) - assert_equal "Hello, Earth", mail.body.strip + # CHANGED: body returns an object now + # assert_equal "Hello, Earth", mail.body.strip + assert_equal "Hello, Earth", mail.body.decoded.strip end def test_file_template mail = RenderMailer.create_file_template(@recipient) - assert_equal "Hello there, \n\nMr. test@localhost", mail.body.strip + # CHANGED: body returns an object now + # assert_equal "Hello there, \n\nMr. test@localhost", mail.body.strip + assert_equal "Hello there, \n\nMr. test@localhost", mail.body.decoded.strip end def test_rxml_template mail = RenderMailer.deliver_rxml_template(@recipient) - assert_equal "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<test/>", mail.body.strip + # CHANGED: body returns an object now + # assert_equal "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<test/>", mail.body.strip + assert_equal "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<test/>", mail.body.decoded.strip end def test_included_subtemplate mail = RenderMailer.deliver_included_subtemplate(@recipient) - assert_equal "Hey Ho, let's go!", mail.body.strip + # CHANGED: body returns an object now + # assert_equal "Hey Ho, let's go!", mail.body.strip + assert_equal "Hey Ho, let's go!", mail.body.decoded.strip end end @@ -125,12 +135,12 @@ class FirstSecondHelperTest < Test::Unit::TestCase def test_ordering mail = FirstMailer.create_share(@recipient) - assert_equal "first mail", mail.body.strip + assert_equal "first mail", mail.body.decoded.strip mail = SecondMailer.create_share(@recipient) - assert_equal "second mail", mail.body.strip + assert_equal "second mail", mail.body.decoded.strip mail = FirstMailer.create_share(@recipient) - assert_equal "first mail", mail.body.strip + assert_equal "first mail", mail.body.decoded.strip mail = SecondMailer.create_share(@recipient) - assert_equal "second mail", mail.body.strip + assert_equal "second mail", mail.body.decoded.strip end end |