@@ -887,6 +887,33 @@ RSpec.describe ActivityPub::Activity::Create do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with an unverifiable quote of a known post, with summary (CW) but no text' do
|
||||
let(:quoted_status) { Fabricate(:status, account: Fabricate(:account, domain: 'example.com')) }
|
||||
|
||||
let(:object_json) do
|
||||
build_object(
|
||||
type: 'Note',
|
||||
summary: 'beware of what she said',
|
||||
content: nil,
|
||||
quote: ActivityPub::TagManager.instance.uri_for(quoted_status)
|
||||
)
|
||||
end
|
||||
|
||||
it 'creates a status with an unverified quote' do
|
||||
expect { subject.perform }.to change(sender.statuses, :count).by(1)
|
||||
|
||||
status = sender.statuses.first
|
||||
expect(status).to_not be_nil
|
||||
expect(status.spoiler_text).to eq 'beware of what she said'
|
||||
expect(status.content).to eq ''
|
||||
expect(status.quote).to_not be_nil
|
||||
expect(status.quote).to have_attributes(
|
||||
state: 'pending',
|
||||
approval_uri: nil
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with an unverifiable quote of a known post' do
|
||||
let(:quoted_status) { Fabricate(:status) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user