forked from baron/baron-sso
fix(backend): fix UserGroup model and NewTenantService signature in bootstrap and tests
This commit is contained in:
@@ -149,7 +149,7 @@ func (m *MockUserRepoForTenant) CountByCompanyCodes(ctx context.Context, codes [
|
||||
func TestTenantService_RegisterTenant_AutoVerify(t *testing.T) {
|
||||
mockRepo := new(MockTenantRepoForSvc)
|
||||
mockOutbox := new(MockKetoOutboxRepositoryShared)
|
||||
svc := NewTenantService(mockRepo, nil, mockOutbox)
|
||||
svc := NewTenantService(mockRepo, nil, nil, mockOutbox)
|
||||
|
||||
ctx := context.Background()
|
||||
name := "New Tenant"
|
||||
@@ -172,7 +172,7 @@ func TestTenantService_RegisterTenant_AutoVerify(t *testing.T) {
|
||||
func TestTenantService_RegisterTenant_WithCreator(t *testing.T) {
|
||||
mockRepo := new(MockTenantRepoForSvc)
|
||||
mockOutbox := new(MockKetoOutboxRepositoryShared)
|
||||
svc := NewTenantService(mockRepo, nil, mockOutbox)
|
||||
svc := NewTenantService(mockRepo, nil, nil, mockOutbox)
|
||||
|
||||
ctx := context.Background()
|
||||
name := "Creator Tenant"
|
||||
@@ -213,7 +213,7 @@ func TestTenantService_RegisterTenant_WithCreator(t *testing.T) {
|
||||
func TestTenantService_RequestRegistration_NoVerify(t *testing.T) {
|
||||
mockRepo := new(MockTenantRepoForSvc)
|
||||
mockOutbox := new(MockKetoOutboxRepositoryShared)
|
||||
svc := NewTenantService(mockRepo, nil, mockOutbox)
|
||||
svc := NewTenantService(mockRepo, nil, nil, mockOutbox)
|
||||
|
||||
ctx := context.Background()
|
||||
name := "Public Tenant"
|
||||
@@ -238,7 +238,7 @@ func TestTenantService_ApproveTenant_SyncAdmin(t *testing.T) {
|
||||
mockKeto := new(MockKetoSvcForTenant)
|
||||
mockOutbox := new(MockKetoOutboxRepositoryShared)
|
||||
|
||||
svc := NewTenantService(mockRepo, mockUserRepo, mockOutbox)
|
||||
svc := NewTenantService(mockRepo, mockUserRepo, nil, mockOutbox)
|
||||
svc.SetKetoService(mockKeto)
|
||||
|
||||
ctx := context.Background()
|
||||
@@ -275,7 +275,7 @@ func TestTenantService_ApproveTenant_SyncAdmin(t *testing.T) {
|
||||
|
||||
func TestTenantService_ListTenants(t *testing.T) {
|
||||
mockRepo := new(MockTenantRepoForSvc)
|
||||
svc := NewTenantService(mockRepo, nil, nil)
|
||||
svc := NewTenantService(mockRepo, nil, nil, nil)
|
||||
ctx := context.Background()
|
||||
|
||||
tenants := []domain.Tenant{{ID: "t1", Name: "Tenant 1"}}
|
||||
|
||||
Reference in New Issue
Block a user