]> source.dussan.org Git - redmine.git/commitdiff
back out from r9031 to r9036
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 1 Mar 2012 11:40:22 +0000 (11:40 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 1 Mar 2012 11:40:22 +0000 (11:40 +0000)
On Rails3, 'to_s' is not alias of 'encoded'.
'to_s' is alias of 'decoded'.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9037 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/files_controller_test.rb
test/functional/issues_controller_test.rb
test/functional/messages_controller_test.rb
test/functional/users_controller_test.rb
test/unit/mailer_test.rb
test/unit/repository_test.rb

index 08fbdf365ca60b023d81def55e52135bd0445533..e37cc855e0ee22c3c116637f7b40b145c8dea962 100644 (file)
@@ -74,7 +74,7 @@ class FilesControllerTest < ActionController::TestCase
     mail = ActionMailer::Base.deliveries.last
     assert_not_nil mail
     assert_equal "[eCookbook] New file", mail.subject
-    assert mail.body.to_s.include?('testfile.txt')
+    assert mail.body.include?('testfile.txt')
   end
 
   def test_create_version_file
index 76f9586af0bc5a46761449b5b799eea68153887c..f85d157ce92793242bbcd60246e5410d19d2fcc8 100644 (file)
@@ -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.to_s.include?("Subject changed from #{old_subject} to #{new_subject}")
+    assert mail.body.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.to_s.include?("Searchable field changed from 125 to New custom value")
+    assert mail.body.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.to_s.include?("Status changed from New to Assigned")
+    assert mail.body.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.to_s.include?(notes)
+    assert mail.body.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.to_s.include?('testfile.txt')
+    assert mail.body.include?('testfile.txt')
   end
 
   def test_put_update_with_failure_should_save_attachments
index 5c04a65b1f4d50b8ffff248e68b6778b79d245fd..b24a444d86ad19302453957f19d9b3a032ff59af 100644 (file)
@@ -106,7 +106,7 @@ class MessagesControllerTest < ActionController::TestCase
     mail = ActionMailer::Base.deliveries.last
     assert_not_nil mail
     assert_equal "[#{message.board.project.name} - #{message.board.name} - msg#{message.root.id}] Test created message", mail.subject
-    assert mail.body.to_s.include?('Message body')
+    assert mail.body.include?('Message body')
     # author
     assert mail.bcc.include?('jsmith@somenet.foo')
     # project member
index 74b9e14d565380331bf3c057f30e84c027190b05..3fc224d0135e1136b8c1c10c1e242f93c00aacc2 100644 (file)
@@ -191,7 +191,7 @@ class UsersControllerTest < ActionController::TestCase
     mail = ActionMailer::Base.deliveries.last
     assert_not_nil mail
     assert_equal [user.mail], mail.bcc
-    assert mail.body.to_s.include?('secret')
+    assert mail.body.include?('secret')
   end
 
   def test_create_with_failure
@@ -252,7 +252,7 @@ class UsersControllerTest < ActionController::TestCase
     mail = ActionMailer::Base.deliveries.last
     assert_not_nil mail
     assert_equal ['foo.bar@somenet.foo'], mail.bcc
-    assert mail.body.to_s.include?(ll('fr', :notice_account_activated))
+    assert mail.body.include?(ll('fr', :notice_account_activated))
   end
 
   def test_update_with_password_change_should_send_a_notification
@@ -266,7 +266,7 @@ class UsersControllerTest < ActionController::TestCase
     mail = ActionMailer::Base.deliveries.last
     assert_not_nil mail
     assert_equal [u.mail], mail.bcc
-    assert mail.body.to_s.include?('newpass')
+    assert mail.body.include?('newpass')
   end
 
   test "put :update with a password change to an AuthSource user switching to Internal authentication" do
index f39f3cdbe273cfcc0c39f812098672e3b0145c82..18a0457136d81af952ad8f00104df75e7ce98993 100644 (file)
@@ -470,7 +470,7 @@ class MailerTest < ActiveSupport::TestCase
     assert_equal 1, ActionMailer::Base.deliveries.size
     mail = last_email
     assert mail.bcc.include?('dlopper@somenet.foo')
-    assert mail.body.to_s.include?('Bug #3: Error 281 when updating a recipe')
+    assert mail.body.include?('Bug #3: Error 281 when updating a recipe')
     assert_equal '1 issue(s) due in the next 42 days', mail.subject
   end
 
@@ -496,7 +496,7 @@ class MailerTest < ActiveSupport::TestCase
     assert_equal 1, ActionMailer::Base.deliveries.size # No mail for dlopper
     mail = last_email
     assert mail.bcc.include?('dlopper@somenet.foo')
-    assert mail.body.to_s.include?('Bug #3: Error 281 when updating a recipe')
+    assert mail.body.include?('Bug #3: Error 281 when updating a recipe')
   end
 
   def last_email
@@ -514,7 +514,7 @@ class MailerTest < ActiveSupport::TestCase
     user.language = 'fr'
     Mailer.deliver_account_activated(user)
     mail = last_email
-    assert mail.body.to_s.include?('Votre compte')
+    assert mail.body.include?('Votre compte')
 
     assert_equal :it, current_language
   end
index 859fafc85e71c9ec5339177411e3a0128d6c3cf9..9d31f0048195f2fe5d6125b44ba538407ac0f50b 100644 (file)
@@ -176,7 +176,7 @@ class RepositoryTest < ActiveSupport::TestCase
     assert_not_nil mail
     assert mail.subject.starts_with?(
         "[#{fixed_issue.project.name} - #{fixed_issue.tracker.name} ##{fixed_issue.id}]")
-    assert mail.body.to_s.include?(
+    assert mail.body.include?(
         "Status changed from #{old_status} to #{fixed_issue.status}")
 
     # ignoring commits referencing an issue of another project