Makes Issue.generate_with_descendants! helper accept attributes only.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10612 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-10-12 08:56:09 +00:00
parent 8bde60dc56
commit 51818cbbb6
4 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -650,7 +650,7 @@ class IssueTest < ActiveSupport::TestCase
end
def test_copy_should_copy_subtasks
issue = Issue.generate_with_descendants!(Project.find(1), :subject => 'Parent')
issue = Issue.generate_with_descendants!
copy = issue.reload.copy
copy.author = User.find(7)
@@ -665,7 +665,7 @@ class IssueTest < ActiveSupport::TestCase
end
def test_copy_should_copy_subtasks_to_target_project
issue = Issue.generate_with_descendants!(Project.find(1), :subject => 'Parent')
issue = Issue.generate_with_descendants!
copy = issue.copy(:project_id => 3)
assert_difference 'Issue.count', 1+issue.descendants.count do
@@ -675,7 +675,7 @@ class IssueTest < ActiveSupport::TestCase
end
def test_copy_should_not_copy_subtasks_twice_when_saving_twice
issue = Issue.generate_with_descendants!(Project.find(1), :subject => 'Parent')
issue = Issue.generate_with_descendants!
copy = issue.reload.copy
assert_difference 'Issue.count', 1+issue.descendants.count do