diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-01 08:11:36 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-01 08:11:36 +0000 |
commit | 9178d4748f19adee08e5b9d58ea1176836249eb6 (patch) | |
tree | 4c9ee2b9b5d57c31a1872610494e425f1b3a0df5 /test/functional/issues_controller_test.rb | |
parent | 786e3cff10f2c6989162f5dacc9547914dd09f76 (diff) | |
download | redmine-9178d4748f19adee08e5b9d58ea1176836249eb6.tar.gz redmine-9178d4748f19adee08e5b9d58ea1176836249eb6.zip |
Default target version for new issues (#1828).
git-svn-id: http://svn.redmine.org/redmine/trunk@14786 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/issues_controller_test.rb')
-rw-r--r-- | test/functional/issues_controller_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 48ba81485..b1c2b26e5 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1715,6 +1715,19 @@ class IssuesControllerTest < ActionController::TestCase end end + def test_new_should_preselect_default_version + version = Version.generate!(:project_id => 1) + Project.find(1).update_attribute :default_version_id, version.id + @request.session[:user_id] = 2 + + get :new, :project_id => 1 + assert_response :success + assert_equal version, assigns(:issue).fixed_version + assert_select 'select[name=?]', 'issue[fixed_version_id]' do + assert_select 'option[value=?][selected=selected]', version.id.to_s + end + end + def test_get_new_with_list_custom_field @request.session[:user_id] = 2 get :new, :project_id => 1, :tracker_id => 1 |