]> source.dussan.org Git - redmine.git/commitdiff
Fix: Unreachable code in QueriesControllerTest#test_bulk_copy_to_another_project.
authorGo MAEDA <maeda@farend.jp>
Sun, 10 Jun 2018 00:16:58 +0000 (00:16 +0000)
committerGo MAEDA <maeda@farend.jp>
Sun, 10 Jun 2018 00:16:58 +0000 (00:16 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@17372 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/issues_controller_test.rb

index d045f92dbaf080d1badf37b33819eced810dd990..9f79908eb18b4d73bad0bc6aa2944ebe49ca8d0e 100644 (file)
@@ -5967,10 +5967,11 @@ class IssuesControllerTest < Redmine::ControllerTest
 
   def test_bulk_copy_to_another_project
     @request.session[:user_id] = 2
-    assert_difference 'Issue.count', 2 do
+    issue_ids = [1, 2]
+    assert_difference 'Issue.count', issue_ids.size do
       assert_no_difference 'Project.find(1).issues.count' do
         post :bulk_update, :params => {
-            :ids => [1, 2],
+            :ids => issue_ids,
             :issue => {
               :project_id => '2'
             },
@@ -5980,7 +5981,7 @@ class IssuesControllerTest < Redmine::ControllerTest
     end
     assert_redirected_to '/projects/ecookbook/issues'
 
-    copies = Issue.order('id DESC').limit(issues.size)
+    copies = Issue.order('id DESC').limit(issue_ids.size)
     copies.each do |copy|
       assert_equal 2, copy.project_id
     end