0
0
Fork 0

Reference value constants from specs (#33479)

This commit is contained in:
Matt Jankowski 2025-01-06 18:25:13 -05:00 committed by GitHub
parent b0634b2943
commit efcd4ea5de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 19 additions and 12 deletions

View file

@ -624,7 +624,7 @@ RSpec.describe ActivityPub::Activity::Create do
type: 'Document',
mediaType: 'image/png',
url: 'http://example.com/attachment.png',
name: '*' * 1500,
name: '*' * MediaAttachment::MAX_DESCRIPTION_LENGTH,
},
],
}
@ -636,7 +636,7 @@ RSpec.describe ActivityPub::Activity::Create do
status = sender.statuses.first
expect(status).to_not be_nil
expect(status.media_attachments.map(&:description)).to include('*' * 1500)
expect(status.media_attachments.map(&:description)).to include('*' * MediaAttachment::MAX_DESCRIPTION_LENGTH)
end
end
@ -651,7 +651,7 @@ RSpec.describe ActivityPub::Activity::Create do
type: 'Document',
mediaType: 'image/png',
url: 'http://example.com/attachment.png',
summary: '*' * 1500,
summary: '*' * MediaAttachment::MAX_DESCRIPTION_LENGTH,
},
],
}
@ -663,7 +663,7 @@ RSpec.describe ActivityPub::Activity::Create do
status = sender.statuses.first
expect(status).to_not be_nil
expect(status.media_attachments.map(&:description)).to include('*' * 1500)
expect(status.media_attachments.map(&:description)).to include('*' * MediaAttachment::MAX_DESCRIPTION_LENGTH)
end
end