Update rubocop-rspec to version 3.6.0 (#34497)

This commit is contained in:
Matt Jankowski 2025-04-24 10:56:13 -04:00 committed by GitHub
parent 22ec828951
commit 6463415e06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 223 additions and 228 deletions

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe UnsuspendAccountService do
shared_context 'with common context' do
shared_context 'when account is unsuspended' do
subject { described_class.new.call(account) }
let!(:local_follower) { Fabricate(:user, current_sign_in_at: 1.hour.ago).account }
@ -31,12 +31,13 @@ RSpec.describe UnsuspendAccountService do
stub_request(:post, 'https://bob.com/inbox').to_return(status: 201)
end
let!(:account) { Fabricate(:account) }
it 'does not change the “suspended” flag' do
expect { subject }.to_not change(account, :suspended?)
end
include_examples 'with common context' do
let!(:account) { Fabricate(:account) }
include_context 'when account is unsuspended' do
let!(:remote_follower) { Fabricate(:account, uri: 'https://alice.com', inbox_url: 'https://alice.com/inbox', protocol: :activitypub, domain: 'alice.com') }
let!(:remote_reporter) { Fabricate(:account, uri: 'https://bob.com', inbox_url: 'https://bob.com/inbox', protocol: :activitypub, domain: 'bob.com') }
@ -65,8 +66,8 @@ RSpec.describe UnsuspendAccountService do
end
describe 'unsuspending a remote account' do
include_examples 'with common context' do
let!(:account) { Fabricate(:account, domain: 'bob.com', uri: 'https://bob.com', inbox_url: 'https://bob.com/inbox', protocol: :activitypub) }
include_context 'when account is unsuspended' do
let!(:account) { Fabricate(:account, domain: 'bob.com', uri: 'https://bob.com', inbox_url: 'https://bob.com/inbox', protocol: :activitypub) }
let!(:resolve_account_service) { instance_double(ResolveAccountService) }
before do