Allow reports with long comments from remote instances, but truncate (#25028)

This commit is contained in:
Emelia Smith 2023-05-22 13:15:21 +02:00 committed by Claire
commit dcffd6b3d7
6 changed files with 61 additions and 8 deletions

View file

@ -4,6 +4,14 @@ RSpec.describe ReportService, type: :service do
subject { described_class.new }
let(:source_account) { Fabricate(:account) }
let(:target_account) { Fabricate(:account) }
context 'with a local account' do
it 'has a uri' do
report = subject.call(source_account, target_account)
expect(report.uri).to_not be_nil
end
end
context 'for a remote account' do
let(:remote_account) { Fabricate(:account, domain: 'example.com', protocol: :activitypub, inbox_url: 'http://example.com/inbox') }