Autofix Rubocop RSpec/LeadingSubject (#23670)
This commit is contained in:
parent
4ea1e0fceb
commit
4552685f6b
78 changed files with 256 additions and 338 deletions
|
@ -31,6 +31,8 @@ RSpec.describe ActivityPub::ProcessAccountService, type: :service do
|
|||
end
|
||||
|
||||
context 'when account is not suspended' do
|
||||
subject { described_class.new.call('alice', 'example.com', payload) }
|
||||
|
||||
let!(:account) { Fabricate(:account, username: 'alice', domain: 'example.com') }
|
||||
|
||||
let(:payload) do
|
||||
|
@ -46,8 +48,6 @@ RSpec.describe ActivityPub::ProcessAccountService, type: :service do
|
|||
allow(Admin::SuspensionWorker).to receive(:perform_async)
|
||||
end
|
||||
|
||||
subject { described_class.new.call('alice', 'example.com', payload) }
|
||||
|
||||
it 'suspends account remotely' do
|
||||
expect(subject.suspended?).to be true
|
||||
expect(subject.suspension_origin_remote?).to be true
|
||||
|
@ -60,6 +60,8 @@ RSpec.describe ActivityPub::ProcessAccountService, type: :service do
|
|||
end
|
||||
|
||||
context 'when account is suspended' do
|
||||
subject { described_class.new.call('alice', 'example.com', payload) }
|
||||
|
||||
let!(:account) { Fabricate(:account, username: 'alice', domain: 'example.com', display_name: '') }
|
||||
|
||||
let(:payload) do
|
||||
|
@ -78,8 +80,6 @@ RSpec.describe ActivityPub::ProcessAccountService, type: :service do
|
|||
account.suspend!(origin: suspension_origin)
|
||||
end
|
||||
|
||||
subject { described_class.new.call('alice', 'example.com', payload) }
|
||||
|
||||
context 'locally' do
|
||||
let(:suspension_origin) { :local }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue