From 014298e020b7fc5e4ffb8ffbfaf726d97b222470 Mon Sep 17 00:00:00 2001 From: Phillip Wirth Date: Tue, 22 Oct 2024 17:38:48 +0200 Subject: [PATCH] fixed test --- .../contextexternaltool/context-external-tool.scope.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/server/src/shared/repo/contextexternaltool/context-external-tool.scope.spec.ts b/apps/server/src/shared/repo/contextexternaltool/context-external-tool.scope.spec.ts index 1083e3a85df..4143a6da892 100644 --- a/apps/server/src/shared/repo/contextexternaltool/context-external-tool.scope.spec.ts +++ b/apps/server/src/shared/repo/contextexternaltool/context-external-tool.scope.spec.ts @@ -1,6 +1,7 @@ import { ToolContextType } from '@modules/tool/common/enum'; import { SchoolExternalToolEntity } from '@modules/tool/school-external-tool/entity'; import { schoolExternalToolEntityFactory } from '@modules/tool/school-external-tool/testing'; +import { ObjectId } from '@mikro-orm/mongodb'; import { ContextExternalToolScope } from './context-external-tool.scope'; describe('CourseExternalToolScope', () => { @@ -63,7 +64,7 @@ describe('CourseExternalToolScope', () => { scope.byContextId(schoolExternalToolEntity.id); - expect(scope.query).toEqual({ contextId: schoolExternalToolEntity.id }); + expect(scope.query).toEqual({ contextId: new ObjectId(schoolExternalToolEntity.id) }); }); }); });