summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-01 20:22:08 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-01 20:22:08 +0000
commit7448e0dbc41a53f643ac3c8ebd486d9aa02f593b (patch)
treeee07026dcfa17c2e13e0723f9dff25150c263d49 /test/functional
parentac46497f1abd9e2e69a0b3c4848d8825847d1934 (diff)
downloadredmine-7448e0dbc41a53f643ac3c8ebd486d9aa02f593b.tar.gz
redmine-7448e0dbc41a53f643ac3c8ebd486d9aa02f593b.zip
Fixed that the bulk edit/copy form does not propose versions and categories for the target project (#10350).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9046 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/issues_controller_test.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index f85d157ce..04df391a1 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -2672,6 +2672,28 @@ class IssuesControllerTest < ActionController::TestCase
:children => {:count => 3} # 2 statuses + "no change" option
end
+ def test_bulk_edit_should_propose_target_project_open_shared_versions
+ @request.session[:user_id] = 2
+ post :bulk_edit, :ids => [1, 2, 6], :issue => {:project_id => 1}
+ assert_response :success
+ assert_template 'bulk_edit'
+ assert_equal Project.find(1).shared_versions.open.all.sort, assigns(:versions).sort
+ assert_tag 'select',
+ :attributes => {:name => 'issue[fixed_version_id]'},
+ :descendant => {:tag => 'option', :content => '2.0'}
+ end
+
+ def test_bulk_edit_should_propose_target_project_categories
+ @request.session[:user_id] = 2
+ post :bulk_edit, :ids => [1, 2, 6], :issue => {:project_id => 1}
+ assert_response :success
+ assert_template 'bulk_edit'
+ assert_equal Project.find(1).issue_categories.sort, assigns(:categories).sort
+ assert_tag 'select',
+ :attributes => {:name => 'issue[category_id]'},
+ :descendant => {:tag => 'option', :content => 'Recipes'}
+ end
+
def test_bulk_update
@request.session[:user_id] = 2
# update issues priority