Prevent NoMethodError on nil class if custom_fields params is not present in IssuesController#new (#969).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1317 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-04-01 17:48:11 +00:00
parent 80a5ad7ff3
commit e4da9d6f10
2 changed files with 13 additions and 1 deletions
+10
View File
@@ -181,6 +181,16 @@ class IssuesControllerTest < Test::Unit::TestCase
assert_equal 'Value for field 2', v.value
end
def test_post_new_without_custom_fields_param
@request.session[:user_id] = 2
post :new, :project_id => 1,
:issue => {:tracker_id => 1,
:subject => 'This is the test_new issue',
:description => 'This is the description',
:priority_id => 5}
assert_redirected_to 'issues/show'
end
def test_copy_issue
@request.session[:user_id] = 2
get :new, :project_id => 1, :copy_from => 1