0
0
Fork 0

Fix remote media descriptions being cut off at 420 chars (#12262)

* Fix remote media descriptions being cut off at 420 chars

Fixes #12258

* Fix tests
This commit is contained in:
ThibG 2019-11-04 13:00:16 +01:00 committed by Eugen Rochko
parent 7488a9e154
commit 650820d62d
3 changed files with 32 additions and 4 deletions

View file

@ -136,10 +136,10 @@ RSpec.describe MediaAttachment, type: :model do
end
describe 'descriptions for remote attachments' do
it 'are cut off at 140 characters' do
it 'are cut off at 1500 characters' do
media = Fabricate(:media_attachment, description: 'foo' * 1000, remote_url: 'http://example.com/blah.jpg')
expect(media.description.size).to be <= 420
expect(media.description.size).to be <= 1_500
end
end
end