feat(auth): align login and bootstrap with new user schema
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { describe, expect, it } from "vitest"
|
||||
|
||||
import { signInSchema } from "@/schemas/auth.schema"
|
||||
|
||||
describe("signInSchema", () => {
|
||||
it("normalizes login emails before authentication", () => {
|
||||
const result = signInSchema.safeParse({
|
||||
email: " Admin@Example.Test ",
|
||||
password: "secret-password",
|
||||
})
|
||||
|
||||
expect(result.success).toBe(true)
|
||||
if (result.success) {
|
||||
expect(result.data.email).toBe("admin@example.test")
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user