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

test that false is correct in output as well

Markus Kahl1d8023fb6236
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 baf4378b02e..89b3bdaa3bc 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
@@ -31,5 +31,15 @@ RSpec.describe OpenProject::AuthSaml do
expect(security[:want_assertions_signed]).to be false
expect(security[:want_assertions_encrypted]).to be false
end
+
+ context "with limit_self_registration: false" do
+ let!(:provider) do
+ create(:saml_provider, slug: "my-saml", limit_self_registration: false)
+ end
+
+ it "includes the false value in the auth hash" do
+ expect(subject[:limit_self_registration]).to be false
+ end
+ end
end
end