diff --git a/src/authentication_request_test.go b/src/authentication_request_test.go index 6ab846d413..2d8bbe6a60 100644 --- a/src/authentication_request_test.go +++ b/src/authentication_request_test.go @@ -859,6 +859,10 @@ func TestCheckUserAuthenticationPossible(t *testing.T) { a := src.AuthenticationRequest{ AllowRules: []*models.ClientAllowRule{}, + Client: &models.Client{ + OrgID: null.NewString("", false), + OrgMemberOnly: false, + }, } ok, err := a.CheckUserAuthenticationPossible(ctx, DB, &u) @@ -876,6 +880,10 @@ func TestCheckUserAuthenticationPossible(t *testing.T) { UserID: null.NewString(u.ID, true), }, }, + Client: &models.Client{ + OrgID: null.NewString("", false), + OrgMemberOnly: false, + }, } ok, err := a.CheckUserAuthenticationPossible(ctx, DB, &u) @@ -895,6 +903,10 @@ func TestCheckUserAuthenticationPossible(t *testing.T) { EmailDomain: null.NewString("example.test", true), }, }, + Client: &models.Client{ + OrgID: null.NewString("", false), + OrgMemberOnly: false, + }, } ok, err := a.CheckUserAuthenticationPossible(ctx, DB, &u) @@ -975,6 +987,10 @@ func TestCheckUserAuthenticationPossible(t *testing.T) { UserID: null.NewString("123", true), }, }, + Client: &models.Client{ + OrgID: null.NewString("", false), + OrgMemberOnly: false, + }, } ok, err := a.CheckUserAuthenticationPossible(ctx, DB, &u) diff --git a/src/main_test.go b/src/main_test.go index 4af6147be3..9ebece56b6 100644 --- a/src/main_test.go +++ b/src/main_test.go @@ -107,7 +107,7 @@ func resetDBTable(ctx context.Context, db *sql.DB) error { func RandomEmail(t *testing.T) string { r, err := lib.RandomStr(10) require.NoError(t, err) - return fmt.Sprintf("%s@example.test", r) + return fmt.Sprintf("%s@example.com", r) } // ユーザを新規作成する diff --git a/src/user_test.go b/src/user_test.go index b15bce7124..6d2c750447 100644 --- a/src/user_test.go +++ b/src/user_test.go @@ -1376,7 +1376,7 @@ func TestRegisterUser(t *testing.T) { r, err := lib.RandomStr(10) require.NoError(t, err) - email := fmt.Sprintf("%s@exammple.test", r) // ドメインを `.test` にする + email := fmt.Sprintf("%s@example.test", r) // ドメインを `.test` にする u, err := src.RegisterUser(ctx, DB, C, email) require.NoError(t, err)