Update Signup to use the queenbee_id for the tenant name

and not the subdomain. This change should have been in #665
This commit is contained in:
Mike Dalessio
2025-07-18 10:11:10 -04:00
parent 16abcf2049
commit 15876b8762
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ class Signup
end
def tenant_name
@tenant_name ||= signal_account.subdomain
@tenant_name ||= @queenbee_account.id.to_s
end
def to_h
@@ -66,7 +66,7 @@ class Signup::AccountsControllerTest < ActionDispatch::IntegrationTest
end
signal_account = SignalId::Account.last
ApplicationRecord.with_tenant(signal_account.subdomain) do
ApplicationRecord.with_tenant(signal_account.queenbee_id) do
assert_equal Account.last, signal_account.peer
end
end
+4 -2
View File
@@ -44,7 +44,8 @@ class SignupTest < ActiveSupport::TestCase
assert @signup.user.persisted?
assert_equal @signup.user.signal_user, @signup.signal_account.owner
assert_includes ApplicationRecord.tenants, @signup.signal_account.subdomain
assert_equal @signup.queenbee_account.id.to_s, @signup.tenant_name
assert_includes ApplicationRecord.tenants, @signup.tenant_name
end
test "the new account is named with company name if present" do
@@ -87,7 +88,8 @@ class SignupTest < ActiveSupport::TestCase
assert @signup.user.persisted?
assert_equal @signup.user.signal_user, @signup.signal_account.owner
assert_includes ApplicationRecord.tenants, @signup.signal_account.subdomain
assert_equal @signup.queenbee_account.id.to_s, @signup.tenant_name
assert_includes ApplicationRecord.tenants, @signup.tenant_name
end
test "#process does nothing if a validation error occurs creating identity" do