You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mastodon/spec/serializers/activitypub/accept_follow_serializer_sp...

22 lines
628 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
RSpec.describe ActivityPub::AcceptFollowSerializer 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("#accepts/follows/#{record.id}"),
object: include(type: 'Follow'),
type: 'Accept'
)
end
end
end