Autofix Rubocop RSpec/LeadingSubject (#23670)
This commit is contained in:
parent
4ea1e0fceb
commit
4552685f6b
78 changed files with 256 additions and 338 deletions
|
@ -29,13 +29,13 @@ RSpec.describe ReportService, type: :service do
|
|||
end
|
||||
|
||||
context 'when the reported status is a DM' do
|
||||
let(:target_account) { Fabricate(:account) }
|
||||
let(:status) { Fabricate(:status, account: target_account, visibility: :direct) }
|
||||
|
||||
subject do
|
||||
-> { described_class.new.call(source_account, target_account, status_ids: [status.id]) }
|
||||
end
|
||||
|
||||
let(:target_account) { Fabricate(:account) }
|
||||
let(:status) { Fabricate(:status, account: target_account, visibility: :direct) }
|
||||
|
||||
context 'when it is addressed to the reporter' do
|
||||
before do
|
||||
status.mentions.create(account: source_account)
|
||||
|
@ -85,13 +85,13 @@ RSpec.describe ReportService, type: :service do
|
|||
end
|
||||
|
||||
context 'when other reports already exist for the same target' do
|
||||
let!(:target_account) { Fabricate(:account) }
|
||||
let!(:other_report) { Fabricate(:report, target_account: target_account) }
|
||||
|
||||
subject do
|
||||
-> { described_class.new.call(source_account, target_account) }
|
||||
end
|
||||
|
||||
let!(:target_account) { Fabricate(:account) }
|
||||
let!(:other_report) { Fabricate(:report, target_account: target_account) }
|
||||
|
||||
before do
|
||||
ActionMailer::Base.deliveries.clear
|
||||
source_account.user.settings.notification_emails['report'] = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue