summaryrefslogtreecommitdiffstats
path: root/test/unit/user_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-08-23 09:05:20 +0000
committerGo MAEDA <maeda@farend.jp>2023-08-23 09:05:20 +0000
commit21a6fc71d6806dc74e087de4cbf7b4acf3b8a3ba (patch)
tree5e205ca3488eb4301266fcdbccfde2a444be0e33 /test/unit/user_test.rb
parent86c5d7814f4c3e860e449cdda05717984ca21405 (diff)
downloadredmine-21a6fc71d6806dc74e087de4cbf7b4acf3b8a3ba.tar.gz
redmine-21a6fc71d6806dc74e087de4cbf7b4acf3b8a3ba.zip
Fix RuboCop offense Performance/MapMethodChain (#37247).
git-svn-id: https://svn.redmine.org/redmine/trunk@22280 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/user_test.rb')
-rw-r--r--test/unit/user_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index bb108549b..704728a60 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -61,8 +61,8 @@ class UserTest < ActiveSupport::TestCase
def test_sorted_scope_should_sort_user_by_display_name
# Use .active to ignore anonymous with localized display name
- assert_equal User.active.map(&:name).map(&:downcase).sort,
- User.active.sorted.map(&:name).map(&:downcase)
+ assert_equal User.active.map {|u| u.name.downcase}.sort,
+ User.active.sorted.map {|u| u.name.downcase}
end
def test_generate