Maintenance: Bump rubocop from 1.18.4 to 1.19.0
This commit is contained in:
parent
b564860989
commit
86e18abd00
6 changed files with 9 additions and 7 deletions
|
@ -497,16 +497,16 @@ GEM
|
||||||
rspec-support (~> 3.10)
|
rspec-support (~> 3.10)
|
||||||
rspec-support (3.10.2)
|
rspec-support (3.10.2)
|
||||||
rszr (0.5.2)
|
rszr (0.5.2)
|
||||||
rubocop (1.18.4)
|
rubocop (1.19.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.0.0.0)
|
parser (>= 3.0.0.0)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
rexml
|
rexml
|
||||||
rubocop-ast (>= 1.8.0, < 2.0)
|
rubocop-ast (>= 1.9.1, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 3.0)
|
unicode-display_width (>= 1.4.0, < 3.0)
|
||||||
rubocop-ast (1.8.0)
|
rubocop-ast (1.10.0)
|
||||||
parser (>= 3.0.1.1)
|
parser (>= 3.0.1.1)
|
||||||
rubocop-faker (1.1.0)
|
rubocop-faker (1.1.0)
|
||||||
faker (>= 2.12.0)
|
faker (>= 2.12.0)
|
||||||
|
|
|
@ -84,6 +84,7 @@ class SearchKnowledgeBaseBackend
|
||||||
.joins(:category)
|
.joins(:category)
|
||||||
.where(knowledge_base_categories: { knowledge_base_id: knowledge_bases })
|
.where(knowledge_base_categories: { knowledge_base_id: knowledge_bases })
|
||||||
|
|
||||||
|
# rubocop:disable Style/RedundantSelfAssignmentBranch
|
||||||
scope = if user&.permissions?('knowledge_base.editor')
|
scope = if user&.permissions?('knowledge_base.editor')
|
||||||
scope
|
scope
|
||||||
elsif user&.permissions?('knowledge_base.reader') && flavor == :agent
|
elsif user&.permissions?('knowledge_base.reader') && flavor == :agent
|
||||||
|
@ -91,6 +92,7 @@ class SearchKnowledgeBaseBackend
|
||||||
else
|
else
|
||||||
scope.published
|
scope.published
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Style/RedundantSelfAssignmentBranch
|
||||||
|
|
||||||
flatten_translation_ids(scope)
|
flatten_translation_ids(scope)
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ RSpec.describe Ticket::State, type: :model do
|
||||||
describe 'of whole table:' do
|
describe 'of whole table:' do
|
||||||
it 'has seven records' do
|
it 'has seven records' do
|
||||||
expect(described_class.pluck(:name))
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue