Fix rubocop warnings on 5.0-stable branch.

git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@22763 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2024-03-03 22:38:03 +00:00
parent 193bf7db65
commit 98aafd06ba
6 changed files with 9 additions and 5 deletions

View File

@@ -296,6 +296,7 @@ module ApplicationHelper
end
when 'CustomValue', 'CustomFieldValue'
return "" unless object.customized&.visible?
if object.custom_field
f = object.custom_field.format.formatted_custom_value(self, object, html)
if f.nil? || f.is_a?(String)

View File

@@ -31,7 +31,11 @@ module Redmine
next unless url
next if url.starts_with?("/") || url.starts_with?("#") || !url.include?(':')
scheme = URI.parse(url).scheme rescue nil
scheme = begin
URI.parse(url).scheme
rescue
nil
end
next if scheme.blank?
klass = node["class"].presence

View File

@@ -1187,7 +1187,7 @@ class IssuesControllerTest < Redmine::ControllerTest
create!(
:name => 'Long text', :field_format => 'text',
:full_width_layout => '1',
:tracker_ids => [1,3], :is_for_all => true
:tracker_ids => [1, 3], :is_for_all => true
)
issue = Issue.find(1)
issue.custom_field_values = {field.id => 'This is a long text'}

View File

@@ -318,7 +318,7 @@ class MessagesControllerTest < Redmine::ControllerTest
:params => {
:board_id => 1,
:id => 3
},
}
)
assert_response 404

View File

@@ -201,7 +201,6 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
within('.tribute-container') do
assert page.has_text? "Dave Lopper"
end
end
def test_inline_autocomplete_for_users_on_issues_bulk_edit_show_autocomplete

View File

@@ -29,7 +29,7 @@ class Redmine::Acts::MentionableTest < ActiveSupport::TestCase
:issues
def test_mentioned_users_with_user_mention
to_test = %w(@dlopper @dlopper! @dlopper? @dlopper. @dlopper,)
to_test = %w(@dlopper @dlopper! @dlopper? @dlopper. @dlopper)
to_test.each do |item|
issue = Issue.generate!(project_id: 1, description: item)