~cytrogen/masto-fe

97385f27bdaac0ce06039ee575b7f17730efc0b5 — Matt Jankowski 2 years ago 9c1929e
Fix Performance/RedundantEqualityComparisonBlock cop (#24799)

2 files changed, 1 insertions(+), 7 deletions(-)

M .rubocop_todo.yml
M spec/requests/link_headers_spec.rb
M .rubocop_todo.yml => .rubocop_todo.yml +0 -6
@@ 328,12 328,6 @@ Performance/MethodObjectAsBlock:
    - 'spec/models/export_spec.rb'

# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowRegexpMatch.
Performance/RedundantEqualityComparisonBlock:
  Exclude:
    - 'spec/requests/link_headers_spec.rb'

# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: MaxKeyValuePairs.
Performance/RedundantMerge:
  Exclude:

M spec/requests/link_headers_spec.rb => spec/requests/link_headers_spec.rb +1 -1
@@ 26,7 26,7 @@ describe 'Link headers' do

    def link_header_with_type(type)
      LinkHeader.parse(response.headers['Link'].to_s).links.find do |link|
        link.attr_pairs.any? { |pair| pair == ['type', type] }
        link.attr_pairs.any?(['type', type])
      end
    end
  end