about summary refs log tree commit diff
path: root/spec/lib/activitypub/activity/reject_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/activitypub/activity/reject_spec.rb')
-rw-r--r--spec/lib/activitypub/activity/reject_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/lib/activitypub/activity/reject_spec.rb b/spec/lib/activitypub/activity/reject_spec.rb
index fed4cd8cd..5e0f09bfe 100644
--- a/spec/lib/activitypub/activity/reject_spec.rb
+++ b/spec/lib/activitypub/activity/reject_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 RSpec.describe ActivityPub::Activity::Reject do
@@ -121,6 +123,8 @@ RSpec.describe ActivityPub::Activity::Reject do
   end
 
   context 'given a relay' do
+    subject { described_class.new(json, sender) }
+
     let!(:relay) { Fabricate(:relay, state: :pending, follow_activity_id: 'https://abc-123/456') }
 
     let(:json) do
@@ -138,8 +142,6 @@ RSpec.describe ActivityPub::Activity::Reject do
       }.with_indifferent_access
     end
 
-    subject { described_class.new(json, sender) }
-
     it 'marks the relay as rejected' do
       subject.perform
       expect(relay.reload.rejected?).to be true