diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-03-01 08:07:41 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-03-01 08:07:41 +0000 |
commit | 41217ffea0eb9a6a47d1fd431ef896c365abb1e6 (patch) | |
tree | 37d52c6678280a114a6e80cfb0c54f3245ad82db | |
parent | 12ba0ba1c552151ffb015fcac68d682cc8e08e28 (diff) | |
download | redmine-41217ffea0eb9a6a47d1fd431ef896c365abb1e6.tar.gz redmine-41217ffea0eb9a6a47d1fd431ef896c365abb1e6.zip |
Rails3: test: add .to_s for mail's bodies check at functional/issues_controller_test.rb
On Rails3, mail's bodies must be checked calling 'encoded'.
'to_s' is alias of 'encoded' of Mail::Message of Rails3.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9032 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/functional/issues_controller_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index f85d157ce..76f9586af 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -2168,7 +2168,7 @@ class IssuesControllerTest < ActionController::TestCase mail = ActionMailer::Base.deliveries.last assert_not_nil mail assert mail.subject.starts_with?("[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}]") - assert mail.body.include?("Subject changed from #{old_subject} to #{new_subject}") + assert mail.body.to_s.include?("Subject changed from #{old_subject} to #{new_subject}") end def test_put_update_with_project_change @@ -2242,7 +2242,7 @@ class IssuesControllerTest < ActionController::TestCase mail = ActionMailer::Base.deliveries.last assert_not_nil mail - assert mail.body.include?("Searchable field changed from 125 to New custom value") + assert mail.body.to_s.include?("Searchable field changed from 125 to New custom value") end def test_put_update_with_multi_custom_field_change @@ -2285,7 +2285,7 @@ class IssuesControllerTest < ActionController::TestCase assert_equal 2, j.details.size mail = ActionMailer::Base.deliveries.last - assert mail.body.include?("Status changed from New to Assigned") + assert mail.body.to_s.include?("Status changed from New to Assigned") # subject should contain the new status assert mail.subject.include?("(#{ IssueStatus.find(2).name })") end @@ -2303,7 +2303,7 @@ class IssuesControllerTest < ActionController::TestCase assert_equal User.anonymous, j.user mail = ActionMailer::Base.deliveries.last - assert mail.body.include?(notes) + assert mail.body.to_s.include?(notes) end def test_put_update_with_note_and_spent_time @@ -2361,7 +2361,7 @@ class IssuesControllerTest < ActionController::TestCase assert_equal 59, File.size(attachment.diskfile) mail = ActionMailer::Base.deliveries.last - assert mail.body.include?('testfile.txt') + assert mail.body.to_s.include?('testfile.txt') end def test_put_update_with_failure_should_save_attachments |