mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-02-24 09:52:00 +00:00
fix: do not append domains to users that have an email as the username
This commit is contained in:
@@ -49,3 +49,11 @@ func TestCoalesceToString(t *testing.T) {
|
||||
// Test with nil input
|
||||
assert.Equal(t, "", utils.CoalesceToString(nil))
|
||||
}
|
||||
|
||||
func TestCompileUserEmail(t *testing.T) {
|
||||
// Test with valid email
|
||||
assert.Equal(t, "user@example.com", utils.CompileUserEmail("user@example.com", "example.com"))
|
||||
|
||||
// Test with invalid email
|
||||
assert.Equal(t, "user@example.com", utils.CompileUserEmail("user", "example.com"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user