mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 17:35:40 +01:00
0ac43700d8
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
21 lines
628 B
Ruby
21 lines
628 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe ActivityPub::RejectFollowSerializer do
|
|
subject { serialized_record_json(record, described_class, adapter: ActivityPub::Adapter) }
|
|
|
|
describe 'serializing an object' do
|
|
let(:record) { Fabricate :follow_request }
|
|
|
|
it 'returns expected attributes' do
|
|
expect(subject.deep_symbolize_keys)
|
|
.to include(
|
|
actor: eq(ActivityPub::TagManager.instance.uri_for(record.target_account)),
|
|
id: match("#rejects/follows/#{record.id}"),
|
|
object: include(type: 'Follow'),
|
|
type: 'Reject'
|
|
)
|
|
end
|
|
end
|
|
end
|