From 650820d62d46e803083b1178a95ba2a29f7d8b6e Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 4 Nov 2019 13:00:16 +0100 Subject: 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 --- spec/models/media_attachment_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/models/media_attachment_spec.rb') diff --git a/spec/models/media_attachment_spec.rb b/spec/models/media_attachment_spec.rb index 266cd4920..7ddfba7ed 100644 --- a/spec/models/media_attachment_spec.rb +++ b/spec/models/media_attachment_spec.rb @@ -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 -- cgit