summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-03-01 11:40:22 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-03-01 11:40:22 +0000
commit2df6c99e675d3edaa2aac2e473cfee2304afa5cf (patch)
tree1d93b4fda9aadf2c630b88ace8e73a8cdd9ef7c1 /test
parent30ce0cd8fb28957f0d15423e12de7024fb94ac50 (diff)
downloadredmine-2df6c99e675d3edaa2aac2e473cfee2304afa5cf.tar.gz
redmine-2df6c99e675d3edaa2aac2e473cfee2304afa5cf.zip
back out from r9031 to r9036
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
Diffstat (limited to 'test')
-rw-r--r--test/functional/files_controller_test.rb2
-rw-r--r--test/functional/issues_controller_test.rb10
-rw-r--r--test/functional/messages_controller_test.rb2
-rw-r--r--test/functional/users_controller_test.rb6
-rw-r--r--test/unit/mailer_test.rb6
-rw-r--r--test/unit/repository_test.rb2
6 files changed, 14 insertions, 14 deletions
diff --git a/test/functional/files_controller_test.rb b/test/functional/files_controller_test.rb
index 08fbdf365..e37cc855e 100644
--- a/test/functional/files_controller_test.rb
+++ b/test/functional/files_controller_test.rb
@@ -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
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 76f9586af..f85d157ce 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.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
diff --git a/test/functional/messages_controller_test.rb b/test/functional/messages_controller_test.rb
index 5c04a65b1..b24a444d8 100644
--- a/test/functional/messages_controller_test.rb
+++ b/test/functional/messages_controller_test.rb
@@ -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
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index 74b9e14d5..3fc224d01 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -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
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb
index f39f3cdbe..18a045713 100644
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -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
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb
index 859fafc85..9d31f0048 100644
--- a/test/unit/repository_test.rb
+++ b/test/unit/repository_test.rb
@@ -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