RSpec: Test for correct media description limit.
parent
dca70079b1
commit
66886d4367
|
@ -136,10 +136,10 @@ RSpec.describe MediaAttachment, type: :model do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'descriptions for remote attachments' do
|
describe 'descriptions for remote attachments' do
|
||||||
it 'are cut off at 140 characters' do
|
it 'are cut off at 666 characters' do
|
||||||
media = Fabricate(:media_attachment, description: 'foo' * 1000, remote_url: 'http://example.com/blah.jpg')
|
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 <= 666
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue