From 8e3013ba96532cab61eb6e5fae2ce30be5e94a57 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sat, 12 Jul 2025 12:33:23 +0000 Subject: refactor: Move db interactions into the trpc routes --- packages/trpc/routers/users.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/trpc/routers/users.test.ts') diff --git a/packages/trpc/routers/users.test.ts b/packages/trpc/routers/users.test.ts index 03e5d590..1c03f47a 100644 --- a/packages/trpc/routers/users.test.ts +++ b/packages/trpc/routers/users.test.ts @@ -14,7 +14,7 @@ import type { CustomTestContext } from "../testUtils"; import * as emailModule from "../email"; import { defaultBeforeEach, getApiCaller } from "../testUtils"; -// Mock server config with all required properties - MUST be before any imports that use config +// Mock server config with email settings vi.mock("@karakeep/shared/config", async (original) => { const mod = (await original()) as typeof import("@karakeep/shared/config"); return { @@ -516,7 +516,7 @@ describe("User Routes", () => { unauthedAPICaller, }) => { // Create a user first - const user = await unauthedAPICaller.users.create({ + await unauthedAPICaller.users.create({ name: "Test User", email: "reset@test.com", password: "pass1234", @@ -534,7 +534,7 @@ describe("User Routes", () => { expect(emailModule.sendPasswordResetEmail).toHaveBeenCalledWith( "reset@test.com", "Test User", - user.id, + expect.any(String), // token ); }); -- cgit v1.2.3-70-g09d2