diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2009-12-27 20:56:16 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2009-12-27 20:56:16 +1100 |
commit | 331d375cc332e9e8a30a7f9e745414769b780c54 (patch) | |
tree | ab4ec042bd652bb40eafa92aa73c6eb9e7335032 /actionmailer/test/mail_render_test.rb | |
parent | d9aadb5b2d79f3f647d5fddd1dae0910d7b83444 (diff) | |
download | rails-331d375cc332e9e8a30a7f9e745414769b780c54.tar.gz rails-331d375cc332e9e8a30a7f9e745414769b780c54.tar.bz2 rails-331d375cc332e9e8a30a7f9e745414769b780c54.zip |
Changing body to use :to_s instead of :decoded... better use case
Diffstat (limited to 'actionmailer/test/mail_render_test.rb')
-rw-r--r-- | actionmailer/test/mail_render_test.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/actionmailer/test/mail_render_test.rb b/actionmailer/test/mail_render_test.rb index 3c97ad2a03..047ba0fb41 100644 --- a/actionmailer/test/mail_render_test.rb +++ b/actionmailer/test/mail_render_test.rb @@ -88,35 +88,35 @@ class RenderHelperTest < Test::Unit::TestCase mail = RenderMailer.create_implicit_body(@recipient) # 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 + assert_equal "Hello there, \n\nMr. test@localhost", mail.body.to_s.strip end def test_inline_template mail = RenderMailer.create_inline_template(@recipient) # CHANGED: body returns an object now # assert_equal "Hello, Earth", mail.body.strip - assert_equal "Hello, Earth", mail.body.decoded.strip + assert_equal "Hello, Earth", mail.body.to_s.strip end def test_file_template mail = RenderMailer.create_file_template(@recipient) # 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 + assert_equal "Hello there, \n\nMr. test@localhost", mail.body.to_s.strip end def test_rxml_template mail = RenderMailer.deliver_rxml_template(@recipient) # 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 + assert_equal "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<test/>", mail.body.to_s.strip end def test_included_subtemplate mail = RenderMailer.deliver_included_subtemplate(@recipient) # 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 + assert_equal "Hey Ho, let's go!", mail.body.to_s.strip end end @@ -135,12 +135,12 @@ class FirstSecondHelperTest < Test::Unit::TestCase def test_ordering mail = FirstMailer.create_share(@recipient) - assert_equal "first mail", mail.body.decoded.strip + assert_equal "first mail", mail.body.to_s.strip mail = SecondMailer.create_share(@recipient) - assert_equal "second mail", mail.body.decoded.strip + assert_equal "second mail", mail.body.to_s.strip mail = FirstMailer.create_share(@recipient) - assert_equal "first mail", mail.body.decoded.strip + assert_equal "first mail", mail.body.to_s.strip mail = SecondMailer.create_share(@recipient) - assert_equal "second mail", mail.body.decoded.strip + assert_equal "second mail", mail.body.to_s.strip end end |