]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Layout/SpaceBeforeBlockBraces in test/unit/query_test.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 23 Oct 2019 13:26:57 +0000 (13:26 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 23 Oct 2019 13:26:57 +0000 (13:26 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18854 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/query_test.rb

index 3524338eb69d008b973cb3812c837b39542f27e9..f039eec7c852781b0971900b33b0cfd088e58e81 100644 (file)
@@ -67,7 +67,7 @@ class QueryTest < ActiveSupport::TestCase
       "Priority"
     ]
     assert_equal expected_order,
-                 (query.available_filters.values.map{|v| v[:name]} & expected_order)
+                 (query.available_filters.values.map {|v| v[:name]} & expected_order)
   end
 
   def test_available_filters_with_custom_fields_should_be_ordered
@@ -85,7 +85,7 @@ class QueryTest < ActiveSupport::TestCase
       "Assignee's order test"
     ]
     assert_equal expected_order,
-                 (query.available_filters.values.map{|v| v[:name]} & expected_order)
+                 (query.available_filters.values.map {|v| v[:name]} & expected_order)
   end
 
   def test_custom_fields_for_all_projects_should_be_available_in_global_queries
@@ -105,7 +105,7 @@ class QueryTest < ActiveSupport::TestCase
     query = IssueQuery.new(:project => nil, :name => '_')
     project_filter = query.available_filters["project_id"]
     assert_not_nil project_filter
-    project_ids = project_filter[:values].map{|p| p[1]}
+    project_ids = project_filter[:values].map {|p| p[1]}
     assert project_ids.include?("1")  # public project
     assert !project_ids.include?("2") # private project user cannot see
   end
@@ -896,7 +896,7 @@ class QueryTest < ActiveSupport::TestCase
     query = IssueQuery.new(:name => '_', :project => Project.find(1))
     filter = query.available_filters["cf_#{cf.id}"]
     assert_not_nil filter
-    assert_include 'me', filter[:values].map{|v| v[1]}
+    assert_include 'me', filter[:values].map {|v| v[1]}
 
     query.filters = { "cf_#{cf.id}" => {:operator => '=', :values => ['me']}}
     result = query.issues
@@ -915,7 +915,7 @@ class QueryTest < ActiveSupport::TestCase
     query = IssueQuery.new(:name => '_')
     filter = query.available_filters['project_id']
     assert_not_nil filter
-    assert_include 'mine', filter[:values].map{|v| v[1]}
+    assert_include 'mine', filter[:values].map {|v| v[1]}
 
     query.filters = { 'project_id' => {:operator => '=', :values => ['mine']}}
     result = query.issues
@@ -927,7 +927,7 @@ class QueryTest < ActiveSupport::TestCase
     query = ProjectQuery.new(:name => '_')
     filter = query.available_filters['id']
     assert_not_nil filter
-    assert_include 'bookmarks', filter[:values].map{|v| v[1]}
+    assert_include 'bookmarks', filter[:values].map {|v| v[1]}
 
     query.filters = { 'id' => {:operator => '=', :values => ['bookmarks']}}
     result = query.results_scope
@@ -940,7 +940,7 @@ class QueryTest < ActiveSupport::TestCase
     query = ProjectQuery.new(:name => '_')
     filter = query.available_filters['id']
 
-    assert_not_include 'bookmarks', filter[:values].map{|v| v[1]}
+    assert_not_include 'bookmarks', filter[:values].map {|v| v[1]}
   end
 
   def test_filter_watched_issues
@@ -2042,7 +2042,7 @@ class QueryTest < ActiveSupport::TestCase
   test "#available_filters should include users of visible projects in cross-project view" do
     users = IssueQuery.new.available_filters["assigned_to_id"]
     assert_not_nil users
-    assert users[:values].map{|u| u[1]}.include?("3")
+    assert users[:values].map {|u| u[1]}.include?("3")
   end
 
   test "#available_filters should include users of subprojects" do
@@ -2052,14 +2052,14 @@ class QueryTest < ActiveSupport::TestCase
     Member.create!(:principal => user1, :project => project.children.visible.first, :role_ids => [1])
     users = IssueQuery.new(:project => project).available_filters["assigned_to_id"]
     assert_not_nil users
-    assert users[:values].map{|u| u[1]}.include?(user1.id.to_s)
-    assert !users[:values].map{|u| u[1]}.include?(user2.id.to_s)
+    assert users[:values].map {|u| u[1]}.include?(user1.id.to_s)
+    assert !users[:values].map {|u| u[1]}.include?(user2.id.to_s)
   end
 
   test "#available_filters should include visible projects in cross-project view" do
     projects = IssueQuery.new.available_filters["project_id"]
     assert_not_nil projects
-    assert projects[:values].map{|u| u[1]}.include?("1")
+    assert projects[:values].map {|u| u[1]}.include?("1")
   end
 
   test "#available_filters should include 'member_of_group' filter" do
@@ -2108,7 +2108,7 @@ class QueryTest < ActiveSupport::TestCase
 
   def test_available_columns_should_not_include_total_estimated_hours_when_trackers_disabled_estimated_hours
     Tracker.visible.each do |tracker|
-      tracker.core_fields = tracker.core_fields.reject{|field| field == 'estimated_hours'}
+      tracker.core_fields = tracker.core_fields.reject {|field| field == 'estimated_hours'}
       tracker.save!
     end
     query = IssueQuery.new