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

Ensure saml configuration is reloaded before specs

Oliver Güntherb4f8935f7a9b
diff --git a/modules/auth_saml/spec/lib/open_project/auth_saml_spec.rb b/modules/auth_saml/spec/lib/open_project/auth_saml_spec.rb
index eb0e8e7480d..249c21477c2 100644
--- a/modules/auth_saml/spec/lib/open_project/auth_saml_spec.rb
+++ b/modules/auth_saml/spec/lib/open_project/auth_saml_spec.rb
@@ -3,7 +3,14 @@ require 'open_project/auth_saml'
describe OpenProject::AuthSaml do
describe ".configuration" do
- let(:config) { OpenProject::AuthSaml.configuration }
+ let(:config) do
+ # the `configuration` method is cached to avoid
+ # loading the SAML file more than once
+ # thus remove any cached value here
+ OpenProject::AuthSaml.remove_instance_variable('@saml_settings')
+ OpenProject::AuthSaml.configuration
+ end
+
context(
"with configuration",