feat: implement sign in with idp

This commit is contained in:
Steven
2024-08-06 22:15:28 +08:00
parent 6db8611a58
commit 647726fc2d
15 changed files with 302 additions and 197 deletions

View File

@ -0,0 +1,31 @@
package util
import (
"testing"
)
func TestValidateEmail(t *testing.T) {
tests := []struct {
email string
want bool
}{
{
email: "t@gmail.com",
want: true,
},
{
email: "@yourselfhosted.com",
want: false,
},
{
email: "1@gmail",
want: true,
},
}
for _, test := range tests {
result := ValidateEmail(test.email)
if result != test.want {
t.Errorf("Validate Email %s: got result %v, want %v.", test.email, result, test.want)
}
}
}