mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-22 02:03:18 +00:00
Add API endpoints to view and revoke one's quoted posts (#35578)
This commit is contained in:
parent
572a0e128d
commit
2dfdcc7dcb
10 changed files with 324 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ActivityPub::DeleteQuoteAuthorizationSerializer do
|
||||
subject { serialized_record_json(quote, described_class, adapter: ActivityPub::Adapter) }
|
||||
|
||||
describe 'serializing an object' do
|
||||
let(:status) { Fabricate(:status) }
|
||||
let(:quote) { Fabricate(:quote, quoted_status: status, state: :accepted, approval_uri: "https://#{Rails.configuration.x.web_domain}/approvals/1234") }
|
||||
|
||||
it 'returns expected attributes' do
|
||||
expect(subject.deep_symbolize_keys)
|
||||
.to include(
|
||||
actor: eq(ActivityPub::TagManager.instance.uri_for(status.account)),
|
||||
object: quote.approval_uri,
|
||||
type: 'Delete'
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue