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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user