about summary refs log tree commit diff
path: root/spec/serializers/activitypub
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-02-26 15:06:03 +0100
committerGitHub <noreply@github.com>2023-02-26 15:06:03 +0100
commit6a4be4e96677eb3e1303ddcab8f8b4bea7298453 (patch)
tree52627bf6dd64b0a33e280442b2de60b4e802a544 /spec/serializers/activitypub
parent45087c1092143e95dfcc85b6c9abc5c6c0a0a5c2 (diff)
parentb91756fd4d475edff890e460c44b3a7245ad51e2 (diff)
Merge pull request #2119 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec/serializers/activitypub')
-rw-r--r--spec/serializers/activitypub/note_serializer_spec.rb (renamed from spec/serializers/activitypub/note_spec.rb)4
-rw-r--r--spec/serializers/activitypub/update_poll_serializer_spec.rb (renamed from spec/serializers/activitypub/update_poll_spec.rb)4
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/serializers/activitypub/note_spec.rb b/spec/serializers/activitypub/note_serializer_spec.rb
index 55bfbc16b..7ea47baef 100644
--- a/spec/serializers/activitypub/note_spec.rb
+++ b/spec/serializers/activitypub/note_serializer_spec.rb
@@ -3,6 +3,8 @@
 require 'rails_helper'
 
 describe ActivityPub::NoteSerializer do
+  subject { JSON.parse(@serialization.to_json) }
+
   let!(:account) { Fabricate(:account) }
   let!(:other)   { Fabricate(:account) }
   let!(:parent)  { Fabricate(:status, account: account, visibility: :public) }
@@ -16,8 +18,6 @@ describe ActivityPub::NoteSerializer do
     @serialization = ActiveModelSerializers::SerializableResource.new(parent, serializer: ActivityPub::NoteSerializer, adapter: ActivityPub::Adapter)
   end
 
-  subject { JSON.parse(@serialization.to_json) }
-
   it 'has a Note type' do
     expect(subject['type']).to eql('Note')
   end
diff --git a/spec/serializers/activitypub/update_poll_spec.rb b/spec/serializers/activitypub/update_poll_serializer_spec.rb
index f9e035eab..4360808b5 100644
--- a/spec/serializers/activitypub/update_poll_spec.rb
+++ b/spec/serializers/activitypub/update_poll_serializer_spec.rb
@@ -3,6 +3,8 @@
 require 'rails_helper'
 
 describe ActivityPub::UpdatePollSerializer do
+  subject { JSON.parse(@serialization.to_json) }
+
   let(:account) { Fabricate(:account) }
   let(:poll)    { Fabricate(:poll, account: account) }
   let!(:status) { Fabricate(:status, account: account, poll: poll) }
@@ -11,8 +13,6 @@ describe ActivityPub::UpdatePollSerializer do
     @serialization = ActiveModelSerializers::SerializableResource.new(status, serializer: ActivityPub::UpdatePollSerializer, adapter: ActivityPub::Adapter)
   end
 
-  subject { JSON.parse(@serialization.to_json) }
-
   it 'has a Update type' do
     expect(subject['type']).to eql('Update')
   end