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:
parent
7488a9e154
commit
650820d62d
3 changed files with 32 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue