diff options
author | Nick Schonning <nschonni@gmail.com> | 2023-02-19 23:24:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 13:24:14 +0900 |
commit | 4552685f6bd400666ec4058783eeabb11568e575 (patch) | |
tree | ab708e0d54b9309f96ef0e4d17e8afd32221c5c6 /spec/serializers/activitypub | |
parent | 4ea1e0fceb0c0c5fee014a99f81f8f13a16f6dde (diff) |
Autofix Rubocop RSpec/LeadingSubject (#23670)
Diffstat (limited to 'spec/serializers/activitypub')
-rw-r--r-- | spec/serializers/activitypub/note_spec.rb | 4 | ||||
-rw-r--r-- | 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_spec.rb index 55bfbc16b..7ea47baef 100644 --- a/spec/serializers/activitypub/note_spec.rb +++ b/spec/serializers/activitypub/note_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_spec.rb index f9e035eab..4360808b5 100644 --- a/spec/serializers/activitypub/update_poll_spec.rb +++ b/spec/serializers/activitypub/update_poll_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 |