diff --git a/src/tests/controllers.tests/dummyData.ts b/src/tests/controllers.tests/dummyData.ts index 58d8272..8d9907e 100644 --- a/src/tests/controllers.tests/dummyData.ts +++ b/src/tests/controllers.tests/dummyData.ts @@ -1,4 +1,5 @@ import mongoose from "mongoose"; +import { templates } from "../../models/resume.model"; export const activityDummyData1 = { user: "test", @@ -61,7 +62,7 @@ export const resumeDummyData1 = { user: "test", itemName: "resumeItem1", itemIds: [new mongoose.Types.ObjectId("65e4f54db1e12e776e01cf31")], - templateId: new mongoose.Types.ObjectId("75e4f54db1e12e776e01cf31"), + templateId: templates.BLUE, } export const sectionHeadingDummyData1 = { diff --git a/src/tests/controllers.tests/resume.test.ts b/src/tests/controllers.tests/resume.test.ts index dc2e94a..4b197c1 100644 --- a/src/tests/controllers.tests/resume.test.ts +++ b/src/tests/controllers.tests/resume.test.ts @@ -1,5 +1,5 @@ import { dbConnect, dbDisconnect } from "../dbHandler"; -import { type resumeType } from "../../models/resume.model"; +import { templates, type resumeType } from "../../models/resume.model"; import { type ActivitiesType } from "../../models/activities.model"; import { resumeDummyData1, activityDummyData1 } from "./dummyData"; import { @@ -85,7 +85,7 @@ describe("Resume controller tests", () => { const newActivity = await createActivity(activityDummyData1 as ActivitiesType); let resumeDummyData2 = structuredClone(resumeDummyData1); resumeDummyData2.itemIds = [newActivity._id]; - resumeDummyData2.templateId = new mongoose.Types.ObjectId("75e4f54db1e12e776e01cf31"); + resumeDummyData2.templateId = templates.JAKES const origResume = await createResume(resumeDummyData2 as resumeType);