mirror of
https://github.com/redmine/redmine.git
synced 2026-03-21 11:52:07 +01:00
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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'}
|
||||
|
||||
@@ -318,7 +318,7 @@ class MessagesControllerTest < Redmine::ControllerTest
|
||||
:params => {
|
||||
:board_id => 1,
|
||||
:id => 3
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
assert_response 404
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user