From e19765e0f2e0b7e99e8c7c5b4285b8ca83892c99 Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 4 Nov 2019 13:00:16 +0100 Subject: port tootsuite#12262 to monsterfork: Fix remote media descriptions being cut off at 420 chars * Fix remote media descriptions being cut off at 420 chars Fixes #12258 * Fix tests --- spec/models/media_attachment_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/models') diff --git a/spec/models/media_attachment_spec.rb b/spec/models/media_attachment_spec.rb index e823f1713..456bc4216 100644 --- a/spec/models/media_attachment_spec.rb +++ b/spec/models/media_attachment_spec.rb @@ -151,10 +151,10 @@ RSpec.describe MediaAttachment, type: :model do end describe 'descriptions for remote attachments' do - it 'are cut off at 666 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 <= 666 + expect(media.description.size).to be <= 1_500 end end end -- cgit