diff options
author | Go MAEDA <maeda@farend.jp> | 2018-06-17 01:07:38 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-06-17 01:07:38 +0000 |
commit | f2843a26d0a63d3e2859bfa00795d42e433830ab (patch) | |
tree | 3ee8a2861b58dbcd834317fa2a35e4e139643458 /test | |
parent | 3e25a8d053e0b4ed504b94be03d3359a935041b1 (diff) | |
download | redmine-f2843a26d0a63d3e2859bfa00795d42e433830ab.tar.gz redmine-f2843a26d0a63d3e2859bfa00795d42e433830ab.zip |
Merged r17390 from trunk to 3.4-stable (#28946).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@17391 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/issue_test.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 0144cfb0e..3a247f9b8 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -1413,6 +1413,25 @@ class IssueTest < ActiveSupport::TestCase assert_equal [3, nil], copy.children.map(&:fixed_version_id) end + def test_copy_should_clear_subtasks_assignee_if_is_locked + user = User.find(2) + + parent = Issue.generate! + child1 = Issue.generate!(:parent_issue_id => parent.id, :subject => 'Child 1', :assigned_to_id => 3) + child2 = Issue.generate!(:parent_issue_id => parent.id, :subject => 'Child 2', :assigned_to_id => user.id) + + user.status = User::STATUS_LOCKED + user.save! + + copy = parent.reload.copy + + assert_difference 'Issue.count', 3 do + assert copy.save + end + + assert_equal [3, nil], copy.children.map(&:assigned_to_id) + end + def test_should_not_call_after_project_change_on_creation issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1, :subject => 'Test', :author_id => 1) |