mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
Fix RuboCop offense Performance/StringInclude (#37247).
git-svn-id: https://svn.redmine.org/redmine/trunk@22003 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -559,14 +559,6 @@ Performance/RedundantSplitRegexpArgument:
|
||||
Exclude:
|
||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
||||
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Performance/StringInclude:
|
||||
Exclude:
|
||||
- 'test/functional/versions_controller_test.rb'
|
||||
- 'test/integration/sessions_test.rb'
|
||||
- 'test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb'
|
||||
- 'test/unit/lib/redmine/wiki_formatting/macros_test.rb'
|
||||
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: OnlySumOrWithInitialValue.
|
||||
Performance/Sum:
|
||||
|
||||
@@ -336,7 +336,7 @@ class VersionsControllerTest < Redmine::ControllerTest
|
||||
end
|
||||
assert_redirected_to :controller => 'projects', :action => 'settings',
|
||||
:tab => 'versions', :id => 'ecookbook'
|
||||
assert flash[:error].match(/Unable to delete version/)
|
||||
assert flash[:error].include?('Unable to delete version')
|
||||
assert Version.find_by_id(2)
|
||||
end
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class SessionsTest < Redmine::IntegrationTest
|
||||
|
||||
get '/my/account'
|
||||
assert_response 302
|
||||
assert flash[:error].match(/Your session has expired/)
|
||||
assert flash[:error].include?('Your session has expired')
|
||||
end
|
||||
|
||||
def test_lock_user_kills_sessions
|
||||
@@ -51,7 +51,7 @@ class SessionsTest < Redmine::IntegrationTest
|
||||
|
||||
get '/my/account'
|
||||
assert_response 302
|
||||
assert flash[:error].match(/Your session has expired/)
|
||||
assert flash[:error].include?('Your session has expired')
|
||||
end
|
||||
|
||||
def test_update_user_does_not_kill_sessions
|
||||
|
||||
@@ -42,7 +42,7 @@ class BazaarAdapterTest < ActiveSupport::TestCase
|
||||
|
||||
def test_cat
|
||||
cat = @adapter.cat('directory/document.txt')
|
||||
assert cat =~ /Write the contents of a file as of a given revision to standard output/
|
||||
assert cat.include?('Write the contents of a file as of a given revision to standard output')
|
||||
end
|
||||
|
||||
def test_cat_path_invalid
|
||||
|
||||
@@ -211,7 +211,7 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest
|
||||
|
||||
def test_macro_hello_world
|
||||
text = "{{hello_world}}"
|
||||
assert textilizable(text).match(/Hello world!/)
|
||||
assert textilizable(text).include?('Hello world!')
|
||||
end
|
||||
|
||||
def test_macro_hello_world_should_escape_arguments
|
||||
|
||||
Reference in New Issue
Block a user