Fix RuboCop offense Rails/RedundantActiveRecordAllMethod (#37248).

git-svn-id: https://svn.redmine.org/redmine/trunk@22340 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2023-10-12 23:10:25 +00:00
parent cb617673b3
commit b81818100c
8 changed files with 17 additions and 17 deletions

View File

@@ -361,7 +361,7 @@ class CustomFieldsControllerTest < Redmine::ControllerTest
assert_select "input[type=checkbox][name=?][value=#{tracker_id}][checked=checked]", 'custom_field[tracker_ids][]'
end
# tracker not checked
(Tracker.all.pluck(:id) - tracker_ids).each do |tracker_id|
(Tracker.pluck(:id) - tracker_ids).each do |tracker_id|
assert_select "input[type=checkbox][name=?][value=#{tracker_id}]", 'custom_field[tracker_ids][]'
end
# project checked
@@ -369,7 +369,7 @@ class CustomFieldsControllerTest < Redmine::ControllerTest
assert_select "input[type=checkbox][name=?][value=#{project_id}][checked=checked]", 'custom_field[project_ids][]'
end
# project not checked
(Project.all.pluck(:id) - project_ids).each do |project_id|
(Project.pluck(:id) - project_ids).each do |project_id|
assert_select "input[type=checkbox][name=?][value=#{project_id}]", 'custom_field[project_ids][]'
end
end