Maintenance: Bump rubocop from 1.18.4 to 1.19.0

This commit is contained in:
Martin Gruner 2021-08-13 08:03:57 +02:00
parent b564860989
commit 86e18abd00
6 changed files with 9 additions and 7 deletions

View file

@ -497,16 +497,16 @@ GEM
rspec-support (~> 3.10)
rspec-support (3.10.2)
rszr (0.5.2)
rubocop (1.18.4)
rubocop (1.19.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.8.0, < 2.0)
rubocop-ast (>= 1.9.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.8.0)
rubocop-ast (1.10.0)
parser (>= 3.0.1.1)
rubocop-faker (1.1.0)
faker (>= 2.12.0)

View file

@ -84,6 +84,7 @@ class SearchKnowledgeBaseBackend
.joins(:category)
.where(knowledge_base_categories: { knowledge_base_id: knowledge_bases })
# rubocop:disable Style/RedundantSelfAssignmentBranch
scope = if user&.permissions?('knowledge_base.editor')
scope
elsif user&.permissions?('knowledge_base.reader') && flavor == :agent
@ -91,6 +92,7 @@ class SearchKnowledgeBaseBackend
else
scope.published
end
# rubocop:enable Style/RedundantSelfAssignmentBranch
flatten_translation_ids(scope)
end

View file

@ -16,7 +16,7 @@ RSpec.describe Ticket::State, type: :model do
describe 'of whole table:' do
it 'has seven records' do
expect(described_class.pluck(:name))
.to match_array(%w[closed merged new open pending\ close pending\ reminder removed])
.to match_array(['closed', 'merged', 'new', 'open', 'pending close', 'pending reminder', 'removed'])
end
end