|
|
@@ -28,7 +28,7 @@ import { getDb } from "@/lib/db";
|
|
|
import User from "@/models/user";
|
|
|
import { createSession } from "@/lib/auth/session";
|
|
|
import { compare as bcryptCompare } from "bcryptjs";
|
|
|
-import { POST } from "./route";
|
|
|
+import { POST, dynamic } from "./route.js";
|
|
|
|
|
|
function createRequestStub(body) {
|
|
|
return {
|
|
|
@@ -44,6 +44,10 @@ describe("POST /api/auth/login", () => {
|
|
|
getDb.mockResolvedValue({}); // we only need it to "connect"
|
|
|
});
|
|
|
|
|
|
+ it('exports dynamic="force-dynamic" (RHL-006)', () => {
|
|
|
+ expect(dynamic).toBe("force-dynamic");
|
|
|
+ });
|
|
|
+
|
|
|
it("logs in successfully with correct credentials", async () => {
|
|
|
const user = {
|
|
|
_id: "507f1f77bcf86cd799439011",
|