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

tests: Set content type in response for HTTPX parser

Kabiru Mwenjadf6119bf8a8a
diff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/upload_link_query.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/upload_link_query.rb
index 4c544ba3b71..529dd2632b4 100644
--- a/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/upload_link_query.rb
+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/upload_link_query.rb
@@ -73,13 +73,13 @@ module Storages
ServiceResult.success(result: ::Storages::UploadLink.new(URI(upload_url), :put))
in { status: 404 }
ServiceResult.failure(result: :not_found,
- errors: ::Storages::StorageError.new(code: :not_found, data: ))
+ errors: ::Storages::StorageError.new(code: :not_found, data:))
in { status: 401 }
ServiceResult.failure(result: :unauthorized,
errors: ::Storages::StorageError.new(code: :unauthorized, data:))
else
ServiceResult.failure(result: :error,
- errors: ::Storages::StorageError.new(code: :error, data: ))
+ errors: ::Storages::StorageError.new(code: :error, data:))
end
end
diff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/upload_link_query_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/upload_link_query_spec.rb
index b5eca473c2b..2ea2acbe02a 100644
--- a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/upload_link_query_spec.rb
+++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/upload_link_query_spec.rb
@@ -50,6 +50,7 @@ RSpec.describe Storages::Peripherals::StorageInteraction::OneDrive::UploadLinkQu
body: { item: { "@microsoft.graph.conflictBehavior" => "rename", name: query_payload['file_name'] } }
).to_return(
status: 200,
+ headers: { 'Content-Type' => 'application/json' },
body: { uploadUrl: "https://sn3302.up.1drv.com/up/fe6987415ace7X4e1eF866337",
expirationDateTime: "2015-01-29T09:21:55.523Z" }.to_json
)