mirror of
https://github.com/moul/sshportal.git
synced 2025-10-09 04:43:59 +08:00
22 lines
335 B
Go
22 lines
335 B
Go
package utils
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestValidateEmail(t *testing.T) {
|
|
|
|
goodEmail := "goodemail@email.com"
|
|
badEmail := "b@2323.22"
|
|
|
|
got := ValidateEmail(goodEmail)
|
|
if got == false {
|
|
t.Errorf("got1= %v; want true", got)
|
|
}
|
|
|
|
got2 := ValidateEmail(badEmail)
|
|
if got2 == false {
|
|
t.Errorf("got2= %v; want false", got2)
|
|
}
|
|
|
|
}
|