@@ -76,7 +76,7 @@ func Test_userRegisterController_allowRegister(t *testing.T) {
7676 mockLoader .EXPECT ().UnmarshalKey (gomock .Any (), "user_register_control" , gomock .Any ()).
7777 DoAndReturn (func (ctx context.Context , key string , config * userRegisterControlConfig , opts ... conf.DecodeOptionFn ) error {
7878 config .Block = false
79- config .AllowedEmails = [] string {}
79+ config .AllowedEmails = ""
8080 return nil
8181 })
8282 return fields {
@@ -96,7 +96,7 @@ func Test_userRegisterController_allowRegister(t *testing.T) {
9696 mockLoader .EXPECT ().UnmarshalKey (gomock .Any (), "user_register_control" , gomock .Any ()).
9797 DoAndReturn (func (ctx context.Context , key string , config * userRegisterControlConfig , opts ... conf.DecodeOptionFn ) error {
9898 config .Block = true
99- config .AllowedEmails = [] string { "test@example.com" , " admin@example.com"}
99+ config .AllowedEmails = "test@example.com; admin@example.com"
100100 return nil
101101 })
102102 return fields {
@@ -116,7 +116,7 @@ func Test_userRegisterController_allowRegister(t *testing.T) {
116116 mockLoader .EXPECT ().UnmarshalKey (gomock .Any (), "user_register_control" , gomock .Any ()).
117117 DoAndReturn (func (ctx context.Context , key string , config * userRegisterControlConfig , opts ... conf.DecodeOptionFn ) error {
118118 config .Block = true
119- config .AllowedEmails = [] string { "admin@example.com" , " allowed@example.com"}
119+ config .AllowedEmails = "admin@example.com; allowed@example.com"
120120 return nil
121121 })
122122 return fields {
@@ -136,7 +136,7 @@ func Test_userRegisterController_allowRegister(t *testing.T) {
136136 mockLoader .EXPECT ().UnmarshalKey (gomock .Any (), "user_register_control" , gomock .Any ()).
137137 DoAndReturn (func (ctx context.Context , key string , config * userRegisterControlConfig , opts ... conf.DecodeOptionFn ) error {
138138 config .Block = true
139- config .AllowedEmails = [] string {}
139+ config .AllowedEmails = ""
140140 return nil
141141 })
142142 return fields {
@@ -236,7 +236,7 @@ func TestUserApplicationImpl_validateRegisterReq(t *testing.T) {
236236 mockLoader .EXPECT ().UnmarshalKey (gomock .Any (), "user_register_control" , gomock .Any ()).
237237 DoAndReturn (func (ctx context.Context , key string , config * userRegisterControlConfig , opts ... conf.DecodeOptionFn ) error {
238238 config .Block = true
239- config .AllowedEmails = [] string { "admin@example.com" }
239+ config .AllowedEmails = "admin@example.com"
240240 return nil
241241 })
242242 return fields {
@@ -262,7 +262,7 @@ func TestUserApplicationImpl_validateRegisterReq(t *testing.T) {
262262 mockLoader .EXPECT ().UnmarshalKey (gomock .Any (), "user_register_control" , gomock .Any ()).
263263 DoAndReturn (func (ctx context.Context , key string , config * userRegisterControlConfig , opts ... conf.DecodeOptionFn ) error {
264264 config .Block = false
265- config .AllowedEmails = [] string {}
265+ config .AllowedEmails = ""
266266 return nil
267267 })
268268 return fields {
@@ -448,7 +448,7 @@ func TestUserApplicationImpl_Register(t *testing.T) {
448448 mockLoader .EXPECT ().UnmarshalKey (gomock .Any (), "user_register_control" , gomock .Any ()).
449449 DoAndReturn (func (ctx context.Context , key string , config * userRegisterControlConfig , opts ... conf.DecodeOptionFn ) error {
450450 config .Block = true
451- config .AllowedEmails = [] string { "admin@example.com" }
451+ config .AllowedEmails = "admin@example.com"
452452 return nil
453453 })
454454 return fields {
@@ -475,7 +475,7 @@ func TestUserApplicationImpl_Register(t *testing.T) {
475475 mockLoader .EXPECT ().UnmarshalKey (gomock .Any (), "user_register_control" , gomock .Any ()).
476476 DoAndReturn (func (ctx context.Context , key string , config * userRegisterControlConfig , opts ... conf.DecodeOptionFn ) error {
477477 config .Block = false
478- config .AllowedEmails = [] string {}
478+ config .AllowedEmails = ""
479479 return nil
480480 })
481481 mockService := servicemocks .NewMockIUserService (ctrl )
@@ -507,7 +507,7 @@ func TestUserApplicationImpl_Register(t *testing.T) {
507507 mockLoader .EXPECT ().UnmarshalKey (gomock .Any (), "user_register_control" , gomock .Any ()).
508508 DoAndReturn (func (ctx context.Context , key string , config * userRegisterControlConfig , opts ... conf.DecodeOptionFn ) error {
509509 config .Block = false
510- config .AllowedEmails = [] string {}
510+ config .AllowedEmails = ""
511511 return nil
512512 })
513513 mockService := servicemocks .NewMockIUserService (ctrl )
@@ -540,7 +540,7 @@ func TestUserApplicationImpl_Register(t *testing.T) {
540540 mockLoader .EXPECT ().UnmarshalKey (gomock .Any (), "user_register_control" , gomock .Any ()).
541541 DoAndReturn (func (ctx context.Context , key string , config * userRegisterControlConfig , opts ... conf.DecodeOptionFn ) error {
542542 config .Block = false
543- config .AllowedEmails = [] string {}
543+ config .AllowedEmails = ""
544544 return nil
545545 })
546546 mockService := servicemocks .NewMockIUserService (ctrl )
@@ -577,7 +577,7 @@ func TestUserApplicationImpl_Register(t *testing.T) {
577577 mockLoader .EXPECT ().UnmarshalKey (gomock .Any (), "user_register_control" , gomock .Any ()).
578578 DoAndReturn (func (ctx context.Context , key string , config * userRegisterControlConfig , opts ... conf.DecodeOptionFn ) error {
579579 config .Block = true
580- config .AllowedEmails = [] string { "test@example.com" , " admin@example.com"}
580+ config .AllowedEmails = "test@example.com; admin@example.com"
581581 return nil
582582 })
583583 mockService := servicemocks .NewMockIUserService (ctrl )
0 commit comments