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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
fix: Update `HTTPX.get` mocks to `OpenProject.httpx.get`
Kabiru Mwenja607338bdc0e7
diff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/file_info_query_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/file_info_query_spec.rbindex ae782aef455..66cc2f726e7 100644--- a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/file_info_query_spec.rb+++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/file_info_query_spec.rb@@ -192,7 +192,9 @@ RSpec.describe Storages::Peripherals::StorageInteraction::OneDrive::FileInfoQuerbefore dorequest = HTTPX::Request.new(:get, 'https://my.timeout.org/')- allow(HTTPX).to receive(:get).and_return(HTTPX::ErrorResponse.new(request, 'Timeout happens', {}))+ httpx_double = class_double(HTTPX, get: HTTPX::ErrorResponse.new(request, 'Timeout happens', {}))++ allow(OpenProject).to receive(:httpx).and_return(httpx_double)endit 'must return an error with wrapped network error response' dodiff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/files_info_query_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/files_info_query_spec.rbindex 5ef8633bd27..c53f589180e 100644--- a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/files_info_query_spec.rb+++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/files_info_query_spec.rb@@ -220,7 +220,9 @@ RSpec.describe Storages::Peripherals::StorageInteraction::OneDrive::FilesInfoQuebefore dorequest = HTTPX::Request.new(:get, 'https://my.timeout.org/')- allow(HTTPX).to receive(:get).and_return(HTTPX::ErrorResponse.new(request, 'Timeout happens', {}))+ httpx_double = class_double(HTTPX, get: HTTPX::ErrorResponse.new(request, 'Timeout happens', {}))++ allow(OpenProject).to receive(:httpx).and_return(httpx_double)endit 'must return an array of file information when called' dodiff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/files_query_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/files_query_spec.rbindex 5f83796ee8e..71e71bf0880 100644--- a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/files_query_spec.rb+++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/files_query_spec.rb@@ -242,7 +242,9 @@ RSpec.describe Storages::Peripherals::StorageInteraction::OneDrive::FilesQuery,context 'with network errors' dobefore dorequest = HTTPX::Request.new(:get, 'https://my.timeout.org/')- allow(HTTPX).to receive(:get).and_return(HTTPX::ErrorResponse.new(request, 'Timeout happens', {}))+ httpx_double = class_double(HTTPX, get: HTTPX::ErrorResponse.new(request, 'Timeout happens', {}))++ allow(OpenProject).to receive(:httpx).and_return(httpx_double)endit 'must return an error with wrapped network error response' dodiff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/open_storage_query_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/open_storage_query_spec.rbindex 44e54762780..7ee646a596a 100644--- a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/open_storage_query_spec.rb+++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/open_storage_query_spec.rb@@ -93,7 +93,9 @@ RSpec.describe Storages::Peripherals::StorageInteraction::OneDrive::OpenStorageQcontext 'with network errors' dobefore dorequest = HTTPX::Request.new(:get, 'https://my.timeout.org/')- allow(HTTPX).to receive(:get).and_return(HTTPX::ErrorResponse.new(request, 'Timeout happens', {}))+ httpx_double = class_double(HTTPX, get: HTTPX::ErrorResponse.new(request, 'Timeout happens', {}))++ allow(OpenProject).to receive(:httpx).and_return(httpx_double)endit 'must return an error with wrapped network error response' do