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

[#56011] fixed unit test expectations

Eric Schubertb292a85be478
diff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/authentication_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/authentication_spec.rb
index 9f72dd2cde7..ce4c0d6a4e1 100644
--- a/modules/storages/spec/common/storages/peripherals/storage_interaction/authentication_spec.rb
+++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/authentication_spec.rb
@@ -100,12 +100,12 @@ RSpec.describe Storages::Peripherals::StorageInteraction::Authentication, :webmo
context "with incomplete storage configuration (missing oauth client)" do
let(:storage) { create(:nextcloud_storage) }
- it "must return unauthorized" do
+ it "must return error" do
result = described_class[auth_strategy].call(storage:, http_options:) { |http| make_request(http) }
expect(result).to be_failure
error = result.errors
- expect(error.code).to eq(:unauthorized)
+ expect(error.code).to eq(:error)
expect(error.data.source)
.to be(Storages::Peripherals::StorageInteraction::AuthenticationStrategies::OAuthUserToken)
end
@@ -200,12 +200,12 @@ RSpec.describe Storages::Peripherals::StorageInteraction::Authentication, :webmo
context "with incomplete storage configuration (missing oauth client)" do
let(:storage) { create(:one_drive_storage) }
- it "must return unauthorized" do
+ it "must return error" do
result = described_class[auth_strategy].call(storage:) { |http| make_request(http) }
expect(result).to be_failure
error = result.errors
- expect(error.code).to eq(:unauthorized)
+ expect(error.code).to eq(:error)
expect(error.data.source)
.to be(Storages::Peripherals::StorageInteraction::AuthenticationStrategies::OAuthUserToken)
end