Merge remote-tracking branch 'parent/main' into upstream-20231225
This commit is contained in:
commit
4355dfc64f
151 changed files with 1711 additions and 644 deletions
|
@ -1208,15 +1208,21 @@ RSpec.describe ActivityPub::Activity::Create do
|
|||
mediaType: 'image/png',
|
||||
url: 'http://example.com/attachment.png',
|
||||
},
|
||||
{
|
||||
type: 'Document',
|
||||
mediaType: 'image/png',
|
||||
url: 'http://example.com/emoji.png',
|
||||
},
|
||||
],
|
||||
}
|
||||
end
|
||||
|
||||
it 'creates status' do
|
||||
it 'creates status with correctly-ordered media attachments' do
|
||||
status = sender.statuses.first
|
||||
|
||||
expect(status).to_not be_nil
|
||||
expect(status.media_attachments.map(&:remote_url)).to include('http://example.com/attachment.png')
|
||||
expect(status.ordered_media_attachments.map(&:remote_url)).to eq ['http://example.com/attachment.png', 'http://example.com/emoji.png']
|
||||
expect(status.ordered_media_attachment_ids).to be_present
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -50,6 +50,10 @@ RSpec.describe ActivityPub::Activity::Delete do
|
|||
it 'sends delete activity to followers of rebloggers' do
|
||||
expect(a_request(:post, 'http://example.com/inbox')).to have_been_made.once
|
||||
end
|
||||
|
||||
it 'deletes the reblog' do
|
||||
expect { reblog.reload }.to raise_error(ActiveRecord::RecordNotFound)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue