about summary refs log tree commit diff
path: root/spec/services/report_service_spec.rb
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-19 23:24:14 -0500
committerGitHub <noreply@github.com>2023-02-20 13:24:14 +0900
commit4552685f6bd400666ec4058783eeabb11568e575 (patch)
treeab708e0d54b9309f96ef0e4d17e8afd32221c5c6 /spec/services/report_service_spec.rb
parent4ea1e0fceb0c0c5fee014a99f81f8f13a16f6dde (diff)
Autofix Rubocop RSpec/LeadingSubject (#23670)
Diffstat (limited to 'spec/services/report_service_spec.rb')
-rw-r--r--spec/services/report_service_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/services/report_service_spec.rb b/spec/services/report_service_spec.rb
index 02bc42ac1..c3a3fddf8 100644
--- a/spec/services/report_service_spec.rb
+++ b/spec/services/report_service_spec.rb
@@ -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