Merged r5283 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@5590 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-04-29 09:06:32 +00:00
parent c2cd4b7f48
commit f078f7127c
2 changed files with 19 additions and 1 deletions
+12
View File
@@ -1286,6 +1286,18 @@ class IssuesControllerTest < ActionController::TestCase
assert !(Issue.find_by_id(1) || Issue.find_by_id(2) || Issue.find_by_id(6))
end
def test_destroy_parent_and_child_issues
parent = Issue.generate!(:project_id => 1, :tracker_id => 1)
child = Issue.generate!(:project_id => 1, :tracker_id => 1, :parent_issue_id => parent.id)
assert child.is_descendant_of?(parent.reload)
@request.session[:user_id] = 2
assert_difference 'Issue.count', -2 do
post :destroy, :ids => [parent.id, child.id], :todo => 'destroy'
end
assert_response 302
end
def test_default_search_scope
get :index
assert_tag :div, :attributes => {:id => 'quick-search'},