Fix RuboCop offense Rails/Pluck (#37248).

git-svn-id: https://svn.redmine.org/redmine/trunk@21928 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2022-10-28 07:50:11 +00:00
parent 6a55e94cd2
commit ee1476f802
8 changed files with 22 additions and 22 deletions

View File

@@ -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