1
0
Fork 0
forked from gitea/nas

Merge remote-tracking branch 'parent/main' into upstream-20241101

This commit is contained in:
KMY 2024-11-01 08:04:03 +09:00
commit 1c1f76697b
200 changed files with 1931 additions and 741 deletions

View file

@ -29,6 +29,22 @@ RSpec.describe 'Media API', :attachment_processing do
end
end
context 'when media description is too long' do
let(:params) do
{
file: fixture_file_upload('attachment-jpg.123456_abcd', 'image/jpeg'),
description: 'aa' * MediaAttachment::MAX_DESCRIPTION_LENGTH,
}
end
it 'returns http error' do
post '/api/v2/media', headers: headers, params: params
expect(response).to have_http_status(422)
expect(response.body).to include 'Description is too long'
end
end
context 'when large format media attachment has not been processed' do
let(:params) { { file: fixture_file_upload('attachment.webm', 'video/webm') } }