Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
Loki-Afro committed Oct 22, 2024
1 parent ab1d7e7 commit d2444f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
});
Expand Down
Original file line number Diff line number Diff line change
@@ -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', () => {
Expand Down Expand Up @@ -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) });
});
});
});
Expand Down

0 comments on commit d2444f5

Please sign in to comment.