diff options
Diffstat (limited to 'test/unit/issue_nested_set_test.rb')
-rw-r--r-- | test/unit/issue_nested_set_test.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/unit/issue_nested_set_test.rb b/test/unit/issue_nested_set_test.rb index 8d98ccf06..b2003d7f2 100644 --- a/test/unit/issue_nested_set_test.rb +++ b/test/unit/issue_nested_set_test.rb @@ -139,7 +139,9 @@ class IssueNestedSetTest < ActiveSupport::TestCase child = create_issue!(:parent_issue_id => parent1.id) grandchild = create_issue!(:parent_issue_id => child.id) - assert child.reload.move_to_project(Project.find(2)) + child.reload + child.project = Project.find(2) + assert child.save child.reload grandchild.reload parent1.reload @@ -159,7 +161,9 @@ class IssueNestedSetTest < ActiveSupport::TestCase assert_equal [1, parent1.id, 1, 6], [parent1.project_id, parent1.root_id, parent1.lft, parent1.rgt] # child can not be moved to Project 2 because its child is on a disabled tracker - assert_equal false, Issue.find(child.id).move_to_project(Project.find(2)) + child = Issue.find(child.id) + child.project = Project.find(2) + assert !child.save child.reload grandchild.reload parent1.reload |