From d2444f5f1a787af0b8dac3608aef49c11ee56836 Mon Sep 17 00:00:00 2001 From: Phillip Wirth Date: Tue, 22 Oct 2024 17:38:48 +0200 Subject: [PATCH] fixed test --- .../entity/context-external-tool.entity.spec.ts | 2 +- .../contextexternaltool/context-external-tool.scope.spec.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/server/src/modules/tool/context-external-tool/entity/context-external-tool.entity.spec.ts b/apps/server/src/modules/tool/context-external-tool/entity/context-external-tool.entity.spec.ts index b04b7c1ee10..7ffec395d88 100644 --- a/apps/server/src/modules/tool/context-external-tool/entity/context-external-tool.entity.spec.ts +++ b/apps/server/src/modules/tool/context-external-tool/entity/context-external-tool.entity.spec.ts @@ -33,7 +33,7 @@ describe(ExternalToolEntity.name, () => { const contextExternalToolEntity: ContextExternalToolEntity = new ContextExternalToolEntity({ id: new ObjectId().toHexString(), schoolTool: schoolExternalToolEntityFactory.buildWithId(), - contextId: 'mockContextId', + contextId: new ObjectId(), contextType: ContextExternalToolType.MEDIA_BOARD, parameters: [], }); 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) }); }); }); });