0
0
Fork 0

Autofix Rubocop RSpec/LeadingSubject (#23670)

This commit is contained in:
Nick Schonning 2023-02-19 23:24:14 -05:00 committed by GitHub
parent 4ea1e0fceb
commit 4552685f6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 256 additions and 338 deletions

View file

@ -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