##// END OF EJS Templates
After copying a task, setting the parent as the orignal task's parent triggers an error (#17580)....
Jean-Philippe Lang -
r14675:300e5e465208
parent child
Show More
@@ -1963,6 +1963,23 class IssueTest < ActiveSupport::TestCase
1963 assert IssueRelation.exists?(relation.id)
1963 assert IssueRelation.exists?(relation.id)
1964 end
1964 end
1965
1965
1966 def test_issue_copy_should_be_able_to_be_moved_to_the_same_parent_as_copied_issue
1967 issue = Issue.generate!
1968 parent = Issue.generate!
1969 issue.parent_issue_id = parent.id
1970 issue.save!
1971 issue.reload
1972
1973 copy = Issue.new.copy_from(issue, :link => true)
1974 relation = new_record(IssueRelation) do
1975 copy.save!
1976 end
1977
1978 copy.parent_issue_id = parent.id
1979 assert_save copy
1980 assert IssueRelation.exists?(relation.id)
1981 end
1982
1966 def test_overdue
1983 def test_overdue
1967 assert Issue.new(:due_date => 1.day.ago.to_date).overdue?
1984 assert Issue.new(:due_date => 1.day.ago.to_date).overdue?
1968 assert !Issue.new(:due_date => Date.today).overdue?
1985 assert !Issue.new(:due_date => Date.today).overdue?
General Comments 0
You need to be logged in to leave comments. Login now