mirror of
https://github.com/redmine/redmine.git
synced 2025-11-07 22:05:56 +01:00
Fix RuboCop offense Performance/MapMethodChain (#37247).
git-svn-id: https://svn.redmine.org/redmine/trunk@22280 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -52,7 +52,7 @@ class WorkflowsControllerTest < Redmine::ControllerTest
|
||||
statuses = IssueStatus.where(:id => [2, 3, 5]).sorted.pluck(:name)
|
||||
assert_equal(
|
||||
["New issue"] + statuses,
|
||||
css_select('table.workflows.transitions-always tbody tr td:first').map(&:text).map(&:strip)
|
||||
css_select('table.workflows.transitions-always tbody tr td:first').map {|e| e.text.strip}
|
||||
)
|
||||
# allowed transitions
|
||||
assert_select 'input[type=checkbox][name=?][value="1"][checked=checked]', 'transitions[3][5][always]'
|
||||
@@ -79,7 +79,7 @@ class WorkflowsControllerTest < Redmine::ControllerTest
|
||||
statuses = IssueStatus.where(:id => [2, 3]).sorted.pluck(:name)
|
||||
assert_equal(
|
||||
["New issue"] + statuses,
|
||||
css_select('table.workflows.transitions-always tbody tr td:first').map(&:text).map(&:strip)
|
||||
css_select('table.workflows.transitions-always tbody tr td:first').map {|e| e.text.strip}
|
||||
)
|
||||
end
|
||||
|
||||
@@ -95,7 +95,7 @@ class WorkflowsControllerTest < Redmine::ControllerTest
|
||||
statuses = IssueStatus.where(:id => [2, 3]).sorted.pluck(:name)
|
||||
assert_equal(
|
||||
["New issue"] + statuses,
|
||||
css_select('table.workflows.transitions-always tbody tr td:first').map(&:text).map(&:strip)
|
||||
css_select('table.workflows.transitions-always tbody tr td:first').map {|e| e.text.strip}
|
||||
)
|
||||
end
|
||||
|
||||
@@ -130,7 +130,7 @@ class WorkflowsControllerTest < Redmine::ControllerTest
|
||||
statuses = IssueStatus.all.sorted.pluck(:name)
|
||||
assert_equal(
|
||||
["New issue"] + statuses,
|
||||
css_select('table.workflows.transitions-always tbody tr td:first').map(&:text).map(&:strip)
|
||||
css_select('table.workflows.transitions-always tbody tr td:first').map {|e| e.text.strip}
|
||||
)
|
||||
assert_select 'input[type=checkbox][name=?]', 'transitions[0][1][always]'
|
||||
end
|
||||
@@ -343,7 +343,7 @@ class WorkflowsControllerTest < Redmine::ControllerTest
|
||||
statuses = IssueStatus.all.sorted.pluck(:name)
|
||||
assert_equal(
|
||||
statuses,
|
||||
css_select('table.workflows.fields_permissions thead tr:nth-child(2) td:not(:first-child)').map(&:text).map(&:strip)
|
||||
css_select('table.workflows.fields_permissions thead tr:nth-child(2) td:not(:first-child)').map {|e| e.text.strip}
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user