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

test/functional/issues_controller_test.rb

index 63e085195b0ebadc8ae0d388c993c6d183164595..eb5b337033160c97dd3f3de3d30d0446a290513b 100644 (file)
@@ -6429,6 +6429,27 @@ class IssuesControllerTest < Redmine::ControllerTest
     end
   end
 
+  test "bulk_edit 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,
+        }
+      }
+    )
+    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_edit_on_different_projects
     @request.session[:user_id] = 2
     get(:bulk_edit, :params => {:ids => [1, 2, 6]})