about summary refs log tree commit diff
path: root/spec/services/activitypub/process_status_update_service_spec.rb
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-19 21:17:41 -0500
committerGitHub <noreply@github.com>2023-02-20 11:17:41 +0900
commit5179c47087e7807162f1466ec61a797586de007f (patch)
tree106d584a459714b39a3b2fe1a87492fa2cdedc74 /spec/services/activitypub/process_status_update_service_spec.rb
parentaef0051fd0723ff03175a8851497056ed07d1a83 (diff)
Autofix Rubocops RSpec/ScatteredLet (#23725)
Diffstat (limited to 'spec/services/activitypub/process_status_update_service_spec.rb')
-rw-r--r--spec/services/activitypub/process_status_update_service_spec.rb28
1 files changed, 13 insertions, 15 deletions
diff --git a/spec/services/activitypub/process_status_update_service_spec.rb b/spec/services/activitypub/process_status_update_service_spec.rb
index ae7db88bf..9a6d75ec0 100644
--- a/spec/services/activitypub/process_status_update_service_spec.rb
+++ b/spec/services/activitypub/process_status_update_service_spec.rb
@@ -6,20 +6,6 @@ end
 
 RSpec.describe ActivityPub::ProcessStatusUpdateService, type: :service do
   let!(:status) { Fabricate(:status, text: 'Hello world', account: Fabricate(:account, domain: 'example.com')) }
-
-  let(:alice) { Fabricate(:account) }
-  let(:bob) { Fabricate(:account) }
-
-  let(:mentions) { [] }
-  let(:tags) { [] }
-  let(:media_attachments) { [] }
-
-  before do
-    mentions.each { |a| Fabricate(:mention, status: status, account: a) }
-    tags.each { |t| status.tags << t }
-    media_attachments.each { |m| status.media_attachments << m }
-  end
-
   let(:payload) do
     {
       '@context': 'https://www.w3.org/ns/activitystreams',
@@ -34,9 +20,21 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService, type: :service do
       ],
     }
   end
-
   let(:json) { Oj.load(Oj.dump(payload)) }
 
+  let(:alice) { Fabricate(:account) }
+  let(:bob) { Fabricate(:account) }
+
+  let(:mentions) { [] }
+  let(:tags) { [] }
+  let(:media_attachments) { [] }
+
+  before do
+    mentions.each { |a| Fabricate(:mention, status: status, account: a) }
+    tags.each { |t| status.tags << t }
+    media_attachments.each { |m| status.media_attachments << m }
+  end
+
   subject { described_class.new }
 
   describe '#call' do