refactor: use MULTI_TENANT env variable, model concern instead of controller (#accepting_signups?)

This commit is contained in:
Adam Haris
2025-12-10 15:14:22 +01:00
parent 64ca9e551e
commit eb8655dc8e
11 changed files with 23 additions and 26 deletions
+3 -3
View File
@@ -65,8 +65,8 @@ class SignupsControllerTest < ActionDispatch::IntegrationTest
end
test "redirects to session#new when single_tenant and user exists" do
previous_single_tenant = ENV["SINGLE_TENANT"]
ENV["SINGLE_TENANT"] = "true"
previous_multi_tenant = ENV["MULTI_TENANT"]
ENV["MULTI_TENANT"] = "false"
users(:david)
@@ -76,6 +76,6 @@ class SignupsControllerTest < ActionDispatch::IntegrationTest
assert_redirected_to new_session_url
end
ensure
ENV["SINGLE_TENANT"] = previous_single_tenant
ENV["MULTI_TENANT"] = previous_multi_tenant
end
end