]> source.dussan.org Git - redmine.git/commitdiff
add functional test "bulk copy should show follow button when project is selected"
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 24 Sep 2020 16:07:28 +0000 (16:07 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 24 Sep 2020 16:07:28 +0000 (16:07 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20078 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/issues_controller_test.rb

index 80e9e7849dc34dc3171eb794e071c3ebb4ca5077..edf973e6a2cbbc6e7ff6349153c601f91fbbf2a8 100644 (file)
@@ -7243,6 +7243,28 @@ class IssuesControllerTest < Redmine::ControllerTest
     end
   end
 
+  test "bulk copy should show follow button when project is selected" do
+    @request.session[:user_id] = 2
+    post(
+      :bulk_edit,
+      :params => {
+        :ids => [1, 3],
+        :issue => {
+          :project_id => 2,
+        },
+        :copy => '1',
+      }
+    )
+    assert_response :success
+
+    assert_select 'form#bulk_edit_form[action=?]', '/issues/bulk_update' do
+      assert_select 'input[type=submit]', 2 do
+        assert_select '[name=?]', 'commit', 1
+        assert_select '[name=?]', 'follow', 1
+      end
+    end
+  end
+
   def test_get_bulk_copy_without_add_issues_permission_should_not_propose_current_project_as_target
     user = setup_user_with_copy_but_not_add_permission
     @request.session[:user_id] = user.id