Autofix Rubocop Style/NestedParenthesizedCalls (#23646)

This commit is contained in:
Nick Schonning 2023-02-17 07:43:10 -05:00 committed by GitHub
parent 37914c8757
commit 936204b9ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View file

@ -3450,14 +3450,6 @@ Style/MutableConstant:
- 'lib/mastodon/snowflake.rb' - 'lib/mastodon/snowflake.rb'
- 'spec/controllers/api/base_controller_spec.rb' - 'spec/controllers/api/base_controller_spec.rb'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowedMethods.
# AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
Style/NestedParenthesizedCalls:
Exclude:
- 'spec/services/post_status_service_spec.rb'
# Offense count: 7 # Offense count: 7
# This cop supports safe autocorrection (--autocorrect). # This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: MinDigits, Strict, AllowedNumbers, AllowedPatterns. # Configuration parameters: MinDigits, Strict, AllowedNumbers, AllowedPatterns.

View file

@ -148,7 +148,7 @@ RSpec.describe PostStatusService, type: :service do
expect do expect do
subject.call(account, text: '@alice hm, @bob is really annoying lately', allowed_mentions: [mentioned_account.id]) subject.call(account, text: '@alice hm, @bob is really annoying lately', allowed_mentions: [mentioned_account.id])
end.to raise_error(an_instance_of(PostStatusService::UnexpectedMentionsError).and having_attributes(accounts: [unexpected_mentioned_account])) end.to raise_error(an_instance_of(PostStatusService::UnexpectedMentionsError).and(having_attributes(accounts: [unexpected_mentioned_account])))
end end
it 'processes duplicate mentions correctly' do it 'processes duplicate mentions correctly' do