Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

We no longer raise a multipart error when metadata is empty

Oliver Günther087360bad09e
diff --git a/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb b/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb
index 04d93d92ce3..24040b2d9d6 100644
--- a/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb
+++ b/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb
@@ -255,7 +255,9 @@ shared_examples 'an APIv3 attachment resource', type: :request, content_type: :j
context 'metadata section is missing' do
let(:request_parts) { { file: file } }
- it_behaves_like 'invalid request body', I18n.t('api_v3.errors.multipart_body_error')
+ it_behaves_like 'constraint violation' do
+ let(:message) { "File #{I18n.t('activerecord.errors.messages.blank')}" }
+ end
end
context 'file section is missing' do