Update rubocop-rspec
to version 3.6.0 (#34497)
This commit is contained in:
parent
22ec828951
commit
6463415e06
41 changed files with 223 additions and 228 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue