add env variable to disable multi-tenancy

This commit is contained in:
Adam Haris
2025-12-09 15:40:01 +01:00
parent 0430ce0620
commit 0780b5168f
8 changed files with 44 additions and 2 deletions
@@ -63,4 +63,19 @@ class SignupsControllerTest < ActionDispatch::IntegrationTest
assert_redirected_to new_signup_completion_path
end
end
test "redirects to session#new when single_tenant and user exists" do
previous_single_tenant = ENV["SINGLE_TENANT"]
ENV["SINGLE_TENANT"] = "true"
users(:david)
untenanted do
get new_signup_path
assert_redirected_to new_session_url
end
ensure
ENV["SINGLE_TENANT"] = previous_single_tenant
end
end