summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-10-28 07:50:11 +0000
committerGo MAEDA <maeda@farend.jp>2022-10-28 07:50:11 +0000
commitee1476f802d34ee31d1e1c990165165338867ff6 (patch)
treed7848fddb34b876dbe05864d0b04ec98d5db8893 /test/integration/api_test
parent6a55e94cd2ac8ed2462aa8b80ab9a96a8d43e25b (diff)
downloadredmine-ee1476f802d34ee31d1e1c990165165338867ff6.tar.gz
redmine-ee1476f802d34ee31d1e1c990165165338867ff6.zip
Fix RuboCop offense Rails/Pluck (#37248).
git-svn-id: https://svn.redmine.org/redmine/trunk@21928 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/api_test')
-rw-r--r--test/integration/api_test/search_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/api_test/search_test.rb b/test/integration/api_test/search_test.rb
index 67cadad51..f05832079 100644
--- a/test/integration/api_test/search_test.rb
+++ b/test/integration/api_test/search_test.rb
@@ -82,14 +82,14 @@ class Redmine::ApiTest::SearchTest < Redmine::ApiTest::Base
assert_equal 11, json['total_count']
assert_equal 0, json['offset']
assert_equal 4, json['limit']
- assert_equal issue[0..3], json['results'].map {|r| r['id']}
+ assert_equal issue[0..3], json['results'].pluck('id')
get '/search.json', :params => {:q => 'search_with_limited_results', :offset => 8, :limit => 4}
json = ActiveSupport::JSON.decode(response.body)
assert_equal 11, json['total_count']
assert_equal 8, json['offset']
assert_equal 4, json['limit']
- assert_equal issue[8..10], json['results'].map {|r| r['id']}
+ assert_equal issue[8..10], json['results'].pluck('id')
end
test "GET /search.xml should not quick jump to the issue with given id" do