Rollen Chunk 4: Benutzerkonto, Abmelde-Icon und fremde Einstellungen
Docker Image / test (push) Canceled after 0s
Docker Image / image (push) Canceled after 0s

This commit is contained in:
loki committed 2026-10-11 19:14:08 +02:00
1 parent beceeeb98b
commit 75eb7ff932
1 file changed
+11
+11
View File
@@ -783,3 +783,14 @@ test("assignStockDataToUser erfasst auch Urlaubstage", async () => {
.get() as { user_id: string };
expect(day.user_id).toBe("u-1");
});
test("userExists meldet vorhandene Konten", async () => {
const { userExists } = await import("@/lib/repository");
const db = freshDb();
initializeDatabase(db);
expect(userExists(db, "niemand")).toBe(false);
db.prepare(
'INSERT INTO "user" (id, name, email, emailVerified, image, createdAt, updatedAt) VALUES (?, ?, ?, ?, ?, ?, ?)',
).run("u-1", "Name", "a@example.org", 0, null, 1, 1);
expect(userExists(db, "u-1")).toBe(true);
});