mirror of
https://github.com/redmine/redmine.git
synced 2025-11-12 00:06:01 +01:00
Fixes for Performance/StringIdentifierArgument introduced in RuboCop Performance 1.13.0 (#35142).
git-svn-id: http://svn.redmine.org/redmine/trunk@21330 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -58,8 +58,8 @@ class Redmine::Helpers::GanttHelperTest < Redmine::HelperTest
|
||||
@gantt.project = @project
|
||||
@gantt.query = IssueQuery.new(:project => @project, :name => 'Gantt')
|
||||
@gantt.view = self
|
||||
@gantt.instance_variable_set('@date_from', options[:date_from] || (today - 14))
|
||||
@gantt.instance_variable_set('@date_to', options[:date_to] || (today + 14))
|
||||
@gantt.instance_variable_set(:@date_from, options[:date_from] || (today - 14))
|
||||
@gantt.instance_variable_set(:@date_to, options[:date_to] || (today + 14))
|
||||
end
|
||||
private :create_gantt
|
||||
|
||||
|
||||
@@ -73,14 +73,14 @@ class Redmine::SafeAttributesTest < ActiveSupport::TestCase
|
||||
|
||||
def test_set_safe_attributes
|
||||
p = Person.new
|
||||
p.send('safe_attributes=', {'firstname' => 'John', 'lastname' => 'Smith', 'login' => 'jsmith'}, User.anonymous)
|
||||
p.send(:safe_attributes=, {'firstname' => 'John', 'lastname' => 'Smith', 'login' => 'jsmith'}, User.anonymous)
|
||||
assert_equal 'John', p.firstname
|
||||
assert_equal 'Smith', p.lastname
|
||||
assert_nil p.login
|
||||
|
||||
p = Person.new
|
||||
User.current = User.find(1)
|
||||
p.send('safe_attributes=', {'firstname' => 'John', 'lastname' => 'Smith', 'login' => 'jsmith'}, User.find(1))
|
||||
p.send(:safe_attributes=, {'firstname' => 'John', 'lastname' => 'Smith', 'login' => 'jsmith'}, User.find(1))
|
||||
assert_equal 'John', p.firstname
|
||||
assert_equal 'Smith', p.lastname
|
||||
assert_equal 'jsmith', p.login
|
||||
|
||||
Reference in New Issue
Block a user