]> source.dussan.org Git - redmine.git/commitdiff
Do not do assertions on mail class.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 25 Feb 2012 09:58:23 +0000 (09:58 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 25 Feb 2012 09:58:23 +0000 (09:58 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8991 e93f8b46-1217-0410-a6f0-8f06a7374b81

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

index 774c5a12fabdd6803f7394944d8de1d2f4ad7d74..90e6589053366a1fe0b81de737c31fd5c2c3200c 100644 (file)
@@ -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
index 3cd0bfc013e08fb685536d5831acfac84c5202e4..e37cc855e0ee22c3c116637f7b40b145c8dea962 100644 (file)
@@ -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
index ca754197cb7bbed6194a72040c17e0fd14493d9f..6c84c3c8ea11c3e0451ec4c041d0e3ede395bfad 100644 (file)
@@ -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
 
index 77c477d4ad316cdb93dbcc6df1706aa30cd354d5..b24a444d86ad19302453957f19d9b3a032ff59af 100644 (file)
@@ -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
index b48aef567149318d5e9d62be40ddb611c5996f6c..0dec28c3eb42ff6de0544c409c0f2e4710fac90f 100644 (file)
@@ -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
index 18a369a0f0790b3d41426977fc942b3c2d2f43a4..9d31f0048195f2fe5d6125b44ba538407ac0f50b 100644 (file)
@@ -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?(