summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-25 09:58:23 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-25 09:58:23 +0000
commit28503d83cbf95f36ea3b6854f4489437380e7a23 (patch)
tree8604a9be87124a589d800cf15e1a967af85f0a8d /test
parentf1b26008b89709285da067f6ccaab45876917e49 (diff)
downloadredmine-28503d83cbf95f36ea3b6854f4489437380e7a23.tar.gz
redmine-28503d83cbf95f36ea3b6854f4489437380e7a23.zip
Do not do assertions on mail class.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8991 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/admin_controller_test.rb2
-rw-r--r--test/functional/files_controller_test.rb2
-rw-r--r--test/functional/issues_controller_test.rb6
-rw-r--r--test/functional/messages_controller_test.rb2
-rw-r--r--test/unit/mailer_test.rb6
-rw-r--r--test/unit/repository_test.rb2
6 files changed, 10 insertions, 10 deletions
diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb
index 774c5a12f..90e658905 100644
--- a/test/functional/admin_controller_test.rb
+++ b/test/functional/admin_controller_test.rb
@@ -85,7 +85,7 @@ class AdminControllerTest < ActionController::TestCase
get :test_email
assert_redirected_to '/settings/edit?tab=notifications'
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
user = User.find(1)
assert_equal [user.mail], mail.bcc
end
diff --git a/test/functional/files_controller_test.rb b/test/functional/files_controller_test.rb
index 3cd0bfc01..e37cc855e 100644
--- a/test/functional/files_controller_test.rb
+++ b/test/functional/files_controller_test.rb
@@ -72,7 +72,7 @@ class FilesControllerTest < ActionController::TestCase
assert_equal Project.find(1), a.container
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert_equal "[eCookbook] New file", mail.subject
assert mail.body.include?('testfile.txt')
end
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index ca754197c..6c84c3c8e 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -1525,7 +1525,7 @@ class IssuesControllerTest < ActionController::TestCase
assert issue.watched_by?(User.find(3))
# Watchers notified
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert [mail.bcc, mail.cc].flatten.include?(User.find(3).mail)
end
@@ -2166,7 +2166,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal '125', issue.custom_value_for(2).value
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ 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}")
end
@@ -2241,7 +2241,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal 'New custom value', issue.custom_value_for(2).value
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert mail.body.include?("Searchable field changed from 125 to New custom value")
end
diff --git a/test/functional/messages_controller_test.rb b/test/functional/messages_controller_test.rb
index 77c477d4a..b24a444d8 100644
--- a/test/functional/messages_controller_test.rb
+++ b/test/functional/messages_controller_test.rb
@@ -104,7 +104,7 @@ class MessagesControllerTest < ActionController::TestCase
assert_equal 1, message.board_id
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ 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.include?('Message body')
# author
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb
index b48aef567..0dec28c3e 100644
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -43,7 +43,7 @@ class MailerTest < ActiveSupport::TestCase
assert Mailer.deliver_issue_edit(journal)
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert_select_email do
# link to the main ticket
@@ -73,7 +73,7 @@ class MailerTest < ActiveSupport::TestCase
assert Mailer.deliver_issue_edit(journal)
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert_select_email do
# link to the main ticket
@@ -106,7 +106,7 @@ class MailerTest < ActiveSupport::TestCase
assert Mailer.deliver_issue_edit(journal)
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert_select_email do
# link to the main ticket
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb
index 18a369a0f..9d31f0048 100644
--- a/test/unit/repository_test.rb
+++ b/test/unit/repository_test.rb
@@ -173,7 +173,7 @@ class RepositoryTest < ActiveSupport::TestCase
# 2 email notifications
assert_equal 2, ActionMailer::Base.deliveries.size
mail = ActionMailer::Base.deliveries.first
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert mail.subject.starts_with?(
"[#{fixed_issue.project.name} - #{fixed_issue.tracker.name} ##{fixed_issue.id}]")
assert mail.body.include?(