]> source.dussan.org Git - redmine.git/commitdiff
Adds an assertion on issues deletion when deleting a project (#5381).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 27 Apr 2010 16:52:41 +0000 (16:52 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 27 Apr 2010 16:52:41 +0000 (16:52 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3693 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/project_test.rb

index 621c11ee7e2673a32e9b9f198b4d314b31cd1050..fc08bb1f7724479e4395e1a488ba35e8cbd1e897 100644 (file)
@@ -147,8 +147,9 @@ class ProjectTest < ActiveSupport::TestCase
     # make sure that the project non longer exists
     assert_raise(ActiveRecord::RecordNotFound) { Project.find(@ecookbook.id) }
     # make sure related data was removed
-    assert Member.find(:all, :conditions => ['project_id = ?', @ecookbook.id]).empty?
-    assert Board.find(:all, :conditions => ['project_id = ?', @ecookbook.id]).empty?
+    assert_nil Member.first(:conditions => {:project_id => @ecookbook.id})
+    assert_nil Board.first(:conditions => {:project_id => @ecookbook.id})
+    assert_nil Issue.first(:conditions => {:project_id => @ecookbook.id})
   end
   
   def test_move_an_orphan_project_to_a_root_project