aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc/routers/users.test.ts
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-07-12 12:33:23 +0000
committerMohamed Bassem <me@mbassem.com>2025-07-12 12:33:23 +0000
commit8e3013ba96532cab61eb6e5fae2ce30be5e94a57 (patch)
treeb101a0ac7e1218ea2562178e055044f315b0c245 /packages/trpc/routers/users.test.ts
parent140311d7419fa2192e5149df8f589c3c3733a399 (diff)
downloadkarakeep-8e3013ba96532cab61eb6e5fae2ce30be5e94a57.tar.zst
refactor: Move db interactions into the trpc routes
Diffstat (limited to 'packages/trpc/routers/users.test.ts')
-rw-r--r--packages/trpc/routers/users.test.ts6
1 files changed, 3 insertions, 3 deletions
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
);
});