diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-03-26 21:31:29 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-03-26 21:31:29 +0000 |
commit | ed5b14884c016208510b713556bc129407aaf4e5 (patch) | |
tree | 2880ae273c504b6f3b9bc373bd3707f5bced97bb /test/unit/issue_relation_test.rb | |
parent | de68231632348f9c345ef883bdd3465a38c073ca (diff) | |
download | redmine-ed5b14884c016208510b713556bc129407aaf4e5.tar.gz redmine-ed5b14884c016208510b713556bc129407aaf4e5.zip |
Fixed that r11641 prevents precedes/follows relations between subtasks (#13586).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11692 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_relation_test.rb')
-rw-r--r-- | test/unit/issue_relation_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/issue_relation_test.rb b/test/unit/issue_relation_test.rb index f15a74c34..f0e74faf7 100644 --- a/test/unit/issue_relation_test.rb +++ b/test/unit/issue_relation_test.rb @@ -137,6 +137,19 @@ class IssueRelationTest < ActiveSupport::TestCase assert_include 'This relation would create a circular dependency', r.errors.full_messages end + def test_subtasks_should_allow_precedes_relation + parent = Issue.generate! + child1 = Issue.generate!(:parent_issue_id => parent.id) + child2 = Issue.generate!(:parent_issue_id => parent.id) + + r = IssueRelation.new( + :issue_from => child1, :issue_to => child2, + :relation_type => IssueRelation::TYPE_PRECEDES + ) + assert r.valid? + assert r.save + end + def test_validates_circular_dependency_on_reverse_relations IssueRelation.delete_all assert IssueRelation.create!( |