diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-12-18 08:54:26 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-12-18 08:54:26 +0000 |
commit | 3b7da88a839fe518bce0e6c215da834c0779cbaa (patch) | |
tree | 839845277f3240d5771c2bace30849cdae4d62d2 /test | |
parent | 757f378ab14f584d5515ec203592f4052c18e542 (diff) | |
download | redmine-3b7da88a839fe518bce0e6c215da834c0779cbaa.tar.gz redmine-3b7da88a839fe518bce0e6c215da834c0779cbaa.zip |
Show an error message when changing an issue's project fails due to errors in child issues (#23888).
git-svn-id: http://svn.redmine.org/redmine/trunk@16089 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/issue_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index e4e611153..844ed5934 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -1709,6 +1709,18 @@ class IssueTest < ActiveSupport::TestCase assert_equal 3, issue.tracker_id end + def test_move_to_another_project_should_set_error_message_on_child_failure + parent = Issue.generate! + child = Issue.generate!(:parent_issue_id => parent.id, :tracker_id => 2) + project = Project.generate!(:tracker_ids => [1]) + + parent.reload + parent.project_id = project.id + assert !parent.save + assert_include "Subtask ##{child.id} could not be moved to the new project: Tracker is not included in the list", + parent.errors[:base] + end + def test_copy_to_the_same_project issue = Issue.find(1) copy = issue.copy |