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
This commit is contained in:
Jean-Philippe Lang 2010-04-27 16:52:41 +00:00
parent c18cb9451d
commit eabe8c51cd
1 changed files with 3 additions and 2 deletions

View 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