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

[#60151] fix test setup with new factory traits

Eric Schuberta2b456079e70
diff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/authentication_strategies/nextcloud_strategies/user_bound_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/authentication_strategies/nextcloud_strategies/user_bound_spec.rb
index 6cb085ebbc3..d1bced37e88 100644
--- a/modules/storages/spec/common/storages/peripherals/storage_interaction/authentication_strategies/nextcloud_strategies/user_bound_spec.rb
+++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/authentication_strategies/nextcloud_strategies/user_bound_spec.rb
@@ -37,7 +37,7 @@ RSpec.describe Storages::Peripherals::StorageInteraction::AuthenticationStrategi
let(:user) { create(:user, identity_url: "#{provider.slug}:me") }
context "if file storage is configured for sso only" do
- let(:storage) { create(:nextcloud_storage) }
+ let(:storage) { create(:nextcloud_storage, :oidc_enabled) }
it "must use an SsoUserToken strategy" do
strategy = described_class.call(user:, storage:)
@@ -46,7 +46,7 @@ RSpec.describe Storages::Peripherals::StorageInteraction::AuthenticationStrategi
end
context "if file storage is configured for sso and oauth" do
- let(:storage) { create(:nextcloud_storage_configured) }
+ let(:storage) { create(:nextcloud_storage_configured, :oidc_enabled) }
it "must use an SsoUserToken strategy" do
strategy = described_class.call(user:, storage:)
@@ -55,7 +55,7 @@ RSpec.describe Storages::Peripherals::StorageInteraction::AuthenticationStrategi
end
context "if file storage is configured for oauth only" do
- let(:storage) { create(:nextcloud_storage_configured, nextcloud_audience: nil) }
+ let(:storage) { create(:nextcloud_storage_configured) }
it "must use an OAuthUserToken strategy" do
strategy = described_class.call(user:, storage:)
@@ -68,7 +68,7 @@ RSpec.describe Storages::Peripherals::StorageInteraction::AuthenticationStrategi
let(:user) { create(:user) }
context "if file storage is configured for sso only" do
- let(:storage) { create(:nextcloud_storage) }
+ let(:storage) { create(:nextcloud_storage, :oidc_enabled) }
it "must return the failure strategy" do
strategy = described_class.call(user:, storage:)
@@ -77,7 +77,7 @@ RSpec.describe Storages::Peripherals::StorageInteraction::AuthenticationStrategi
end
context "if file storage is configured for sso and oauth" do
- let(:storage) { create(:nextcloud_storage_configured) }
+ let(:storage) { create(:nextcloud_storage_configured, :oidc_enabled) }
it "must use an OAuthUserToken strategy" do
strategy = described_class.call(user:, storage:)
@@ -86,7 +86,7 @@ RSpec.describe Storages::Peripherals::StorageInteraction::AuthenticationStrategi
end
context "if file storage is configured for oauth only" do
- let(:storage) { create(:nextcloud_storage_configured, nextcloud_audience: nil) }
+ let(:storage) { create(:nextcloud_storage_configured) }
it "must use an OAuthUserToken strategy" do
strategy = described_class.call(user:, storage:)
@@ -97,7 +97,7 @@ RSpec.describe Storages::Peripherals::StorageInteraction::AuthenticationStrategi
context "if file storage is not fully configured" do
let(:user) { create(:user) }
- let(:storage) { create(:nextcloud_storage, nextcloud_audience: nil) }
+ let(:storage) { create(:nextcloud_storage) }
it "must return the failure strategy" do
strategy = described_class.call(user:, storage:)