summaryrefslogtreecommitdiffstats
path: root/test/unit/issue_transaction_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-10-12 09:02:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-10-12 09:02:25 +0000
commit92391abd1e5e184f9f6a7a6138d273932881981e (patch)
treebc629238e5ec7f36afcb8fb785118dead1ad8a40 /test/unit/issue_transaction_test.rb
parent51818cbbb6bc36f773eb9e225e070d0492b0ac36 (diff)
downloadredmine-92391abd1e5e184f9f6a7a6138d273932881981e.tar.gz
redmine-92391abd1e5e184f9f6a7a6138d273932881981e.zip
Removed issue_create! helper in favour of Issue.generate!
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10613 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_transaction_test.rb')
-rw-r--r--test/unit/issue_transaction_test.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/test/unit/issue_transaction_test.rb b/test/unit/issue_transaction_test.rb
index 14cefeea2..371646df3 100644
--- a/test/unit/issue_transaction_test.rb
+++ b/test/unit/issue_transaction_test.rb
@@ -30,9 +30,9 @@ class IssueTransactionTest < ActiveSupport::TestCase
self.use_transactional_fixtures = false
def test_invalid_move_to_another_project
- parent1 = create_issue!
- child = create_issue!(:parent_issue_id => parent1.id)
- grandchild = create_issue!(:parent_issue_id => child.id, :tracker_id => 2)
+ parent1 = Issue.generate!
+ child = Issue.generate!(:parent_issue_id => parent1.id)
+ grandchild = Issue.generate!(:parent_issue_id => child.id, :tracker_id => 2)
Project.find(2).tracker_ids = [1]
parent1.reload
@@ -51,9 +51,4 @@ class IssueTransactionTest < ActiveSupport::TestCase
assert_equal [1, parent1.id, 2, 5], [child.project_id, child.root_id, child.lft, child.rgt]
assert_equal [1, parent1.id, 3, 4], [grandchild.project_id, grandchild.root_id, grandchild.lft, grandchild.rgt]
end
-
- # Helper that creates an issue with default attributes
- def create_issue!(attributes={})
- Issue.create!({:project_id => 1, :tracker_id => 1, :author_id => 1, :subject => 'test'}.merge(attributes))
- end
end