]> source.dussan.org Git - redmine.git/commitdiff
add functional test "bulk_edit should hide follow button when project is not changed"
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 21 Sep 2020 13:04:33 +0000 (13:04 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 21 Sep 2020 13:04:33 +0000 (13:04 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20065 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/issues_controller_test.rb

index 1d16b8c44ea6c8a0c33f6e81acdd642d1f013c68..80e9e7849dc34dc3171eb794e071c3ebb4ca5077 100644 (file)
@@ -6456,6 +6456,27 @@ class IssuesControllerTest < Redmine::ControllerTest
     end
   end
 
+  test "bulk_edit should hide follow button when project is not changed" do
+    @request.session[:user_id] = 2
+    post(
+      :bulk_edit,
+      :params => {
+        :ids => [1, 3],
+        :issue => {
+          :project_id => "",
+        }
+      }
+    )
+    assert_response :success
+
+    assert_select 'form#bulk_edit_form[action=?]', '/issues/bulk_update' do
+      assert_select 'input[type=submit]', 1 do
+        assert_select '[name=?]', 'commit', 1
+        assert_select '[name=?]', 'follow', 0
+      end
+    end
+  end
+
   def test_get_bulk_edit_on_different_projects
     @request.session[:user_id] = 2
     get(:bulk_edit, :params => {:ids => [1, 2, 6]})