summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-27 16:52:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-27 16:52:41 +0000
commiteabe8c51cd9ba065c287208b7becd8bbf10112bb (patch)
tree14ab0b3bbd2dffa866256570eca9af405a7e5332
parentc18cb9451dfbf5a75718eede6fdf2e4c9109f819 (diff)
downloadredmine-eabe8c51cd9ba065c287208b7becd8bbf10112bb.tar.gz
redmine-eabe8c51cd9ba065c287208b7becd8bbf10112bb.zip
Adds an assertion on issues deletion when deleting a project (#5381).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3693 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/unit/project_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb
index 621c11ee7..fc08bb1f7 100644
--- a/test/unit/project_test.rb
+++ b/test/unit/project_test.rb
@@ -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