mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 22:36:02 +01:00
Fixed that entering #nnn as parent task should validate (#11979).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10658 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1940,12 +1940,24 @@ class IssuesControllerTest < ActionController::TestCase
|
||||
post :create, :project_id => 1,
|
||||
:issue => {:tracker_id => 1,
|
||||
:subject => 'This is a child issue',
|
||||
:parent_issue_id => 2}
|
||||
|
||||
:parent_issue_id => '2'}
|
||||
assert_response 302
|
||||
end
|
||||
issue = Issue.find_by_subject('This is a child issue')
|
||||
assert_not_nil issue
|
||||
issue = Issue.order('id DESC').first
|
||||
assert_equal Issue.find(2), issue.parent
|
||||
end
|
||||
|
||||
def test_post_create_subissue_with_sharp_parent_id
|
||||
@request.session[:user_id] = 2
|
||||
|
||||
assert_difference 'Issue.count' do
|
||||
post :create, :project_id => 1,
|
||||
:issue => {:tracker_id => 1,
|
||||
:subject => 'This is a child issue',
|
||||
:parent_issue_id => '#2'}
|
||||
assert_response 302
|
||||
end
|
||||
issue = Issue.order('id DESC').first
|
||||
assert_equal Issue.find(2), issue.parent
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user